diff options
| author | cgd <cgd@NetBSD.org> | 1995-02-27 12:31:34 +0000 |
|---|---|---|
| committer | cgd <cgd@NetBSD.org> | 1995-02-27 12:31:34 +0000 |
| commit | 4eab61bd40c07b2fc612ad50cface2b77fc110d0 (patch) | |
| tree | 7118747f1d9919499fdea5d7c6908c5cfe04e5a8 /lib/libc/sys/_exit.2 | |
| parent | c67e54a2e2b9f3d455a30d68ea4e09e56d7b9136 (diff) | |
merge with lite, keeping most local changes. clean up Ids
Diffstat (limited to 'lib/libc/sys/_exit.2')
| -rw-r--r-- | lib/libc/sys/_exit.2 | 49 |
1 files changed, 34 insertions, 15 deletions
diff --git a/lib/libc/sys/_exit.2 b/lib/libc/sys/_exit.2 index e5fa6e598b7..402de8fb9b1 100644 --- a/lib/libc/sys/_exit.2 +++ b/lib/libc/sys/_exit.2 @@ -1,5 +1,7 @@ -.\" Copyright (c) 1980 Regents of the University of California. -.\" All rights reserved. +.\" $NetBSD: _exit.2,v 1.6 1995/02/27 12:31:34 cgd Exp $ +.\" +.\" Copyright (c) 1980, 1993 +.\" The Regents of the University of California. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -29,10 +31,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" from: @(#)_exit.2 6.6 (Berkeley) 7/25/91 -.\" $Id: _exit.2,v 1.5 1994/10/17 23:49:08 cgd Exp $ +.\" @(#)_exit.2 8.1 (Berkeley) 6/4/93 .\" -.Dd July 25, 1991 +.Dd June 4, 1993 .Dt EXIT 2 .Os BSD 4 .Sh NAME @@ -40,7 +41,7 @@ .Nd terminate the calling process .Sh SYNOPSIS .Fd #include <unistd.h> -.Ft void +.Ft void .Fn _exit "int status" .Sh DESCRIPTION The @@ -56,13 +57,13 @@ a process in this state may not be killed, as it is already dying. If the parent process of the calling process has an outstanding .Xr wait call -or is interested in the +or catches the .Dv SIGCHLD signal, it is notified of the calling process's termination and the .Em status -area is set as defined by +is set as defined by .Xr wait 2 . .It The parent process-ID of all of the calling process's existing child @@ -70,8 +71,26 @@ processes are set to 1; the initialization process (see the DEFINITIONS section of .Xr intro 2 ) inherits each of these processes. -Any stopped children are restarted with a hangup signal -.Pq Dv SIGHUP . +.It +If the termination of the process causes any process group +to become orphaned (usually because the parents of all members +of the group have now exited; see +.Dq orphaned process group +in +.Xr intro 2 ) , +and if any member of the orphaned group is stopped, +the +.Dv SIGHUP +signal and the +.Dv SIGCONT +signal are sent to all members of the newly-orphaned process group. +.It +If the process is a controlling process (see +.Xr intro 2 ) , +the +.Dv SIGHUP +signal is sent to the foreground process group of the controlling terminal, +and all current access to the controlling terminal is revoked. .El .Pp Most C programs call the library routine @@ -88,8 +107,8 @@ can never return. .Xr sigaction 2 , .Xr wait 2 , .Xr exit 3 -.Sh HISTORY -An -.Fn exit -function call appeared in -.At v6 . +.Sh STANDARDS +The +.Nm _exit +function is defined by +.St -p1003.1-88 . |
