|
|
1.1 root 1:
2:
3: _exit() COHERENT System Call _exit()
4:
5:
6:
7:
8: Terminate a program
9:
10: vvooiidd _eexxiitt(_s_t_a_t_u_s) iinntt _s_t_a_t_u_s;
11:
12: _exit terminates a program directly. It returns _s_t_a_t_u_s to the
13: calling program, and exits. Unlike the library function exit,
14: _exit does not perform extra termination cleanup, such as
15: flushing buffered files and closing open files.
16:
17: _exit should be used only in situations where you do _n_o_t want
18: buffers flushed or files closed. For example, you may wish to
19: call _exit if your program detects an irreparable error condition
20: and you want to ``bail out'' to keep your data files from being
21: corrupted.
22:
23: _exit should also be used with programs that do not use STDIO.
24: Unlike exit, _exit does not use STDIO. This will help you create
25: programs that are extremely small when compiled.
26:
27: ***** See Also *****
28:
29: close(), COHERENT system calls, wait()
30:
31: ***** Notes *****
32:
33: If a program leaves main() by an error condition, contents of
34: register AX becomes the exit code. Usually, these register con-
35: tents are random. If you want to test a program's return code,
36: you must to exit or return from main().
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64: COHERENT Lexicon Page 1
65:
66:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.