diff options
Diffstat (limited to 'src/lib/libc/stdlib')
| -rw-r--r-- | src/lib/libc/stdlib/Makefile.inc | 3 | ||||
| -rw-r--r-- | src/lib/libc/stdlib/exit.3 | 43 |
2 files changed, 10 insertions, 36 deletions
diff --git a/src/lib/libc/stdlib/Makefile.inc b/src/lib/libc/stdlib/Makefile.inc index 5f3a142ec4..d75fe5f7b1 100644 --- a/src/lib/libc/stdlib/Makefile.inc +++ b/src/lib/libc/stdlib/Makefile.inc | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # $OpenBSD: Makefile.inc,v 1.47 2012/12/03 20:08:33 millert Exp $ | 1 | # $OpenBSD: Makefile.inc,v 1.48 2013/06/05 04:06:08 guenther Exp $ |
| 2 | 2 | ||
| 3 | # stdlib sources | 3 | # stdlib sources |
| 4 | .PATH: ${LIBCSRCDIR}/arch/${MACHINE_CPU}/stdlib ${LIBCSRCDIR}/stdlib | 4 | .PATH: ${LIBCSRCDIR}/arch/${MACHINE_CPU}/stdlib ${LIBCSRCDIR}/stdlib |
| @@ -38,7 +38,6 @@ MAN+= a64l.3 abort.3 abs.3 alloca.3 atexit.3 atof.3 atoi.3 atol.3 atoll.3 \ | |||
| 38 | qabs.3 qdiv.3 qsort.3 radixsort.3 rand48.3 rand.3 random.3 realpath.3 \ | 38 | qabs.3 qdiv.3 qsort.3 radixsort.3 rand48.3 rand.3 random.3 realpath.3 \ |
| 39 | strtod.3 strtonum.3 strtol.3 strtoul.3 system.3 tsearch.3 | 39 | strtod.3 strtonum.3 strtol.3 strtoul.3 system.3 tsearch.3 |
| 40 | 40 | ||
| 41 | MLINKS+=exit.3 _Exit.3 | ||
| 42 | MLINKS+=ecvt.3 fcvt.3 ecvt.3 gcvt.3 | 41 | MLINKS+=ecvt.3 fcvt.3 ecvt.3 gcvt.3 |
| 43 | MLINKS+=getenv.3 setenv.3 getenv.3 unsetenv.3 getenv.3 putenv.3 | 42 | MLINKS+=getenv.3 setenv.3 getenv.3 unsetenv.3 getenv.3 putenv.3 |
| 44 | MLINKS+=getopt_long.3 getopt_long_only.3 | 43 | MLINKS+=getopt_long.3 getopt_long_only.3 |
diff --git a/src/lib/libc/stdlib/exit.3 b/src/lib/libc/stdlib/exit.3 index 11d4bc2304..86c4daed53 100644 --- a/src/lib/libc/stdlib/exit.3 +++ b/src/lib/libc/stdlib/exit.3 | |||
| @@ -29,30 +29,25 @@ | |||
| 29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 30 | .\" SUCH DAMAGE. | 30 | .\" SUCH DAMAGE. |
| 31 | .\" | 31 | .\" |
| 32 | .\" $OpenBSD: exit.3,v 1.13 2013/06/05 03:39:23 tedu Exp $ | 32 | .\" $OpenBSD: exit.3,v 1.14 2013/06/05 04:06:08 guenther Exp $ |
| 33 | .\" | 33 | .\" |
| 34 | .Dd $Mdocdate: June 5 2013 $ | 34 | .Dd $Mdocdate: June 5 2013 $ |
| 35 | .Dt EXIT 3 | 35 | .Dt EXIT 3 |
| 36 | .Os | 36 | .Os |
| 37 | .Sh NAME | 37 | .Sh NAME |
| 38 | .Nm exit, _Exit | 38 | .Nm exit |
| 39 | .Nd perform normal program termination | 39 | .Nd perform normal program termination |
| 40 | .Sh SYNOPSIS | 40 | .Sh SYNOPSIS |
| 41 | .In stdlib.h | 41 | .In stdlib.h |
| 42 | .Ft void | 42 | .Ft void |
| 43 | .Fn exit "int status" | 43 | .Fn exit "int status" |
| 44 | .Ft void | ||
| 45 | .Fn _Exit "int status" | ||
| 46 | .Sh DESCRIPTION | 44 | .Sh DESCRIPTION |
| 47 | The | 45 | The |
| 48 | .Fn exit | 46 | .Fn exit |
| 49 | and | 47 | function terminates a process. |
| 50 | .Fn _Exit | ||
| 51 | functions terminate a process. | ||
| 52 | .Pp | 48 | .Pp |
| 53 | Before termination, | 49 | Before termination it performs the following functions in the |
| 54 | .Fn exit | 50 | order listed: |
| 55 | performs the following operations in the order listed: | ||
| 56 | .Bl -enum -offset indent | 51 | .Bl -enum -offset indent |
| 57 | .It | 52 | .It |
| 58 | Call the functions registered with the | 53 | Call the functions registered with the |
| @@ -68,25 +63,9 @@ Unlink all files created with the | |||
| 68 | function. | 63 | function. |
| 69 | .El | 64 | .El |
| 70 | .Pp | 65 | .Pp |
| 71 | The | 66 | Following this, |
| 72 | .Fn _Exit | ||
| 73 | function terminates without calling the functions registered with the | ||
| 74 | .Xr atexit 3 | ||
| 75 | function. | ||
| 76 | The | ||
| 77 | .Ox | ||
| 78 | implementation of | ||
| 79 | .Fn _Exit | ||
| 80 | does not flush open output streams or unlink files created with the | ||
| 81 | .Xr tmpfile 3 | ||
| 82 | function. | ||
| 83 | However, this behavior is implementation-specific. | ||
| 84 | .Pp | ||
| 85 | Lastly, | ||
| 86 | .Fn exit | 67 | .Fn exit |
| 87 | and | 68 | calls |
| 88 | .Fn _Exit | ||
| 89 | call | ||
| 90 | .Xr _exit 2 . | 69 | .Xr _exit 2 . |
| 91 | Note that typically | 70 | Note that typically |
| 92 | .Xr _exit 2 | 71 | .Xr _exit 2 |
| @@ -96,9 +75,7 @@ on to the parent, thus negative values have less meaning. | |||
| 96 | .Sh RETURN VALUES | 75 | .Sh RETURN VALUES |
| 97 | The | 76 | The |
| 98 | .Fn exit | 77 | .Fn exit |
| 99 | and | 78 | function never returns. |
| 100 | .Fn _Exit | ||
| 101 | functions never return. | ||
| 102 | .Sh SEE ALSO | 79 | .Sh SEE ALSO |
| 103 | .Xr _exit 2 , | 80 | .Xr _exit 2 , |
| 104 | .Xr atexit 3 , | 81 | .Xr atexit 3 , |
| @@ -108,9 +85,7 @@ functions never return. | |||
| 108 | .Sh STANDARDS | 85 | .Sh STANDARDS |
| 109 | The | 86 | The |
| 110 | .Fn exit | 87 | .Fn exit |
| 111 | and | 88 | function conforms to |
| 112 | .Fn _Exit | ||
| 113 | functions conform to | ||
| 114 | .St -ansiC-99 . | 89 | .St -ansiC-99 . |
| 115 | .Sh HISTORY | 90 | .Sh HISTORY |
| 116 | An | 91 | An |
