diff options
author | obrien <obrien@FreeBSD.org> | 1999-08-29 23:46:20 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 1999-08-29 23:46:20 +0000 |
commit | 23cf060089cc9b938f255c8a6e57d319c428bed8 (patch) | |
tree | 57811b6581d77973d261153ae7dbe737bea578b2 /contrib | |
parent | 0a8146a28696476d356aa919de5f5f947afd1bda (diff) | |
download | FreeBSD-src-23cf060089cc9b938f255c8a6e57d319c428bed8.zip FreeBSD-src-23cf060089cc9b938f255c8a6e57d319c428bed8.tar.gz |
Correct vfork()/exit() to vfork()/_exit().
Also return "1" rather than "-1". According to bde: -1 is unrepresentable.
Exit statuses must be >= 0 and <= 255, at least if chars are 8 bits and
shorts are 16 bits. This seems to only be documented indirectly in exit.2
by referring to wait.2. WEXITSTATUS() throws away all except the low 8 bits
of the status returned by _exit(), and the kernel actually only stores 8
bits of it (if chars are 8 bits, etc.), so wait() can't return any more bits.
Obtained from: rev 1.4 of contrib/gcc/gcc.c
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/gcc/pexecute.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/gcc/pexecute.c b/contrib/gcc/pexecute.c index 804f314..a210b62 100644 --- a/contrib/gcc/pexecute.c +++ b/contrib/gcc/pexecute.c @@ -739,7 +739,7 @@ pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg, flags) #else fprintf (stderr, ": %s\n", xstrerror (errno)); #endif - exit (-1); + _exit (1); /* NOTREACHED */ return 0; |