|
|
1.1 ! root 1: .ds ZZ DEVELOPMENT PACKAGE ! 2: .TH EXIT 3R "630 MTG" ! 3: .XE "exit()" ! 4: .SH NAME ! 5: exit \- cease execution ! 6: .SH SYNOPSIS ! 7: .B void exit ( ); ! 8: .SH DESCRIPTION ! 9: The ! 10: .I exit ! 11: function ! 12: terminates a process. ! 13: Calling ! 14: .I exit ! 15: replaces the running process with the default terminal program. ! 16: When a process calls ! 17: .IR exit , ! 18: all local resources [keyboard, mouse, storage, etc.] ! 19: are deallocated automatically. ! 20: Any associated \s-1UNIX\s+1 system process must ! 21: be terminated separately. ! 22: .PP ! 23: Exit is called automatically when an application program ! 24: returns from main( ). ! 25: .PP ! 26: When dmdio.h is included, ! 27: .I exit ! 28: acts differently. ! 29: In addition to the above, it will terminate the host side of ! 30: .IR jx . ! 31: Therefore, exit must be called ! 32: .br ! 33: explicitly by a process downloaded with ! 34: .I jx ! 35: to terminate the host side. ! 36: .SH EXAMPLE ! 37: The following code fragment shows how a process can exit ! 38: when a ``q'' is typed. ! 39: ! 40: .RS 3 ! 41: .ft CM ! 42: .nf ! 43: #include <dmd.h> ! 44: ! 45: main() ! 46: { ! 47: char c; ! 48: ! 49: request (KBD); ! 50: ! 51: . ! 52: . ! 53: ! 54: if ( (c = kbdchar()) == 'q') ! 55: exit(); ! 56: . ! 57: . ! 58: ! 59: } ! 60: .fi ! 61: .ft R ! 62: .RE
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.