]> git.saurik.com Git - apple/libc.git/blobdiff - gen/FreeBSD/signal.3
Libc-825.24.tar.gz
[apple/libc.git] / gen / FreeBSD / signal.3
index 4fa65c960fc476ffadec2fcfefef33b326374bb4..f18d1cf399798d0b36baf7c4672861990aa5b0ce 100644 (file)
@@ -9,10 +9,6 @@
 .\" 2. Redistributions in binary form must reproduce the above copyright
 .\"    notice, this list of conditions and the following disclaimer in the
 .\"    documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\"    must display the following acknowledgement:
-.\"    This product includes software developed by the University of
-.\"    California, Berkeley and its contributors.
 .\" 4. Neither the name of the University nor the names of its contributors
 .\"    may be used to endorse or promote products derived from this software
 .\"    without specific prior written permission.
@@ -30,7 +26,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)signal.3   8.3 (Berkeley) 4/19/94
-.\" $FreeBSD: src/lib/libc/gen/signal.3,v 1.38 2004/07/03 22:30:08 ru Exp $
+.\" $FreeBSD: src/lib/libc/gen/signal.3,v 1.43 2008/07/17 21:54:23 simon Exp $
 .\"
 .Dd June 7, 2004
 .Dt SIGNAL 3
 .Lb libc
 .Sh SYNOPSIS
 .In signal.h
-.\" The following is Quite Ugly, but syntactically correct.
-.\" Don't try to
-.\" fix it.
-.Ft void \*(lp*
-.Fn signal "int sig" "void \*(lp*func\*(rp\*(lpint\*(rp\*(rp\*(rp\*(lpint"
+.\" XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX
+.\" The prototype for signal(3) cannot be cleanly marked up in -mdoc
+.\" without the following lower-level tweak.
+.nr in-synopsis-section 0
 .Pp
-or in
-.Fx Ns 's
-equivalent but easier to read typedef'd version:
+.Ft "void \*(lp*" Ns
+.Fo signal
+.Fa "int sig"
+.Fa "void \*(lp*func\*(rp\*(lpint\*(rp"
+.Fc Ns
+.Ft "\*(rp\*(lpint\*(rp" ;
+.Pp
+.nr in-synopsis-section 1
+.\" XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX
+or in the equivalent but easier to read typedef'd version:
 .Ft typedef "void \*(lp*sig_t\*(rp \*(lpint\*(rp" ;
+.Pp
 .Ft sig_t
 .Fn signal "int sig" "sig_t func"
 .Sh DESCRIPTION
@@ -62,9 +65,9 @@ is a simplified interface to the more general
 .Xr sigaction 2
 facility.
 .Pp
-Signals allow the manipulation of a process from outside its
-domain as well as allowing the process to manipulate itself or
-copies of itself (children).
+Signals allow the manipulation of a process from outside its domain,
+as well as allowing the process to manipulate itself
+or copies of itself (children).
 There are two general types of signals:
 those that cause termination of a process and those that do not.
 Signals which cause termination of a program might result from
@@ -77,11 +80,10 @@ Signals are optionally generated
 when a process resumes after being stopped,
 when the status of child processes changes,
 or when input is ready at the control terminal.
-Most signals result in the termination of the process receiving them
-if no action
-is taken; some signals instead cause the process receiving them
-to be stopped, or are simply discarded if the process has not
-requested otherwise.
+Most signals result in the termination of the process receiving them,
+if no action is taken;
+some signals instead cause the process receiving them to be stopped,
+or are simply discarded if the process has not requested otherwise.
 Except for the
 .Dv SIGKILL
 and
@@ -135,7 +137,6 @@ is possible on a descriptor (see
 .It 29 Ta Dv SIGINFO Ta "discard signal" Ta "status request from keyboard"
 .It 30 Ta Dv SIGUSR1 Ta "terminate process" Ta "User defined signal 1"
 .It 31 Ta Dv SIGUSR2 Ta "terminate process" Ta "User defined signal 2"
-.It 32 Ta Dv SIGTHR Ta "terminate process" Ta "thread interrupt"
 .El
 .Pp
 The
@@ -151,7 +152,7 @@ should be
 A
 .Dv SIG_DFL
 resets the default action.
-To ignore the signal
+To ignore the signal,
 .Fa func
 should be
 .Dv SIG_IGN .
@@ -176,16 +177,18 @@ func() remains installed after a signal has been delivered.
 For some system calls, if a signal is caught while the call is
 executing and the call is prematurely terminated,
 the call is automatically restarted.
-(The handler is installed using the
+Any handler installed with
+.Xr signal 3
+will have the
 .Dv SA_RESTART
-flag with
-.Xr sigaction 2 . )
+flag set, meaning that any restartable system call will not return on
+receipt of a signal.
 The affected system calls include
 .Xr read 2 ,
 .Xr write 2 ,
 .Xr sendto 2 ,
 .Xr recvfrom 2 ,
-.Xr sendmsg 2
+.Xr sendmsg 2 ,
 and
 .Xr recvmsg 2
 on a communications channel or a low speed device
@@ -247,7 +250,7 @@ is not a valid signal number.
 An attempt is made to ignore or supply a handler for
 .Dv SIGKILL
 or
-.Ev SIGSTOP .
+.Dv SIGSTOP .
 .El
 .Sh SEE ALSO
 .Xr kill 1 ,
@@ -263,8 +266,8 @@ or
 .Xr siginterrupt 3 ,
 .Xr tty 4
 .Sh HISTORY
-This
-.Fn signal
+The
+.Nm
 facility appeared in
 .Bx 4.0 .
 The option to avoid the creation of child zombies through ignoring