diff options
author | rsc <devnull@localhost> | 2006-02-14 19:39:30 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2006-02-14 19:39:30 +0000 |
commit | 3449b18918ac83c6d85cc31b87a3afbfadfceeeb (patch) | |
tree | 0a2123f4925b76e158d3a090b7f551d6d21fcdaa /man/man3 | |
parent | a79e8ab44d667ef005e000dad03f60ae86742d31 (diff) | |
download | plan9port-3449b18918ac83c6d85cc31b87a3afbfadfceeeb.tar.gz plan9port-3449b18918ac83c6d85cc31b87a3afbfadfceeeb.tar.bz2 plan9port-3449b18918ac83c6d85cc31b87a3afbfadfceeeb.zip |
add exticode
Diffstat (limited to 'man/man3')
-rw-r--r-- | man/man3/exits.3 | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/man/man3/exits.3 b/man/man3/exits.3 index 62c9e56c..1bab40af 100644 --- a/man/man3/exits.3 +++ b/man/man3/exits.3 @@ -1,6 +1,6 @@ .TH EXITS 3 .SH NAME -exits, _exits, atexit, atexitdont, terminate \- terminate process, process cleanup +exits, _exits, exitcode, atexit, atexitdont \- terminate process, process cleanup .SH SYNOPSIS .B #include <u.h> .br @@ -13,6 +13,9 @@ void _exits(char *msg) void exits(char *msg) .PP .B +int exitcode(char *msg) +.PP +.B int atexit(void(*)(void)) .PP .B @@ -87,8 +90,19 @@ cancels a previous registration of an exit function. .SH BUGS Because of limitations of Unix, the exit status of a process can only be an 8-bit integer. -Exit status 0 is used for empty exit messages, and 1 for -non-empty messages. +.I Exits +and +.I _exits +treat null or empty exit status as exit code 0 +and call +.I exitcode +to translate any other string into an exit code. +By default, the library provides an +.I exitcode +that maps all messages to 1. +Applications may find it useful to provide their own +implementations of +.I exitcode . .PP Exit codes 97 through 99 are used by the thread library to signal internal synchronization errors between the main program |