sigaction.3
来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 3 代码 · 共 79 行
3
79 行
.\" SCCSID: @(#)sigaction.3 2.3 6/8/87.TH sigaction 3 .ie t .ds d \(dg.el .ds d \z'|+'.ie t .ds b \(bu.el .ds b @.SH Namesigaction \- software signal facilities (POSIX).SH Syntax.nf.B #include <signal.h>.PP.B struct sigaction {.B void (*sa_handler)();.B sigset_t sa_mask;.B int sa_flags;.B };.PP.B int sigaction(sig, vec, ovec).B int sig;.B struct sigaction *vec, *ovec;.fi.SH Description.NXB "sigaction system call".NXB "signal handler" "assigning"The sigaction call is the POSIX equivalent to the.MS sigvec 2system call. This call behaves as described on the.MS sigvec 2reference page with the following modifications:.IP \(bu 5Thesignal maskis manipulated using the .MS sigsetops 3functions..IP \(bu 5A process can suppress the generation of the SIGCHLD when a child stops bysetting the SA_NOCLDSTOP bit in .IR sa_flags ..IP \(bu 5The SV_INTERRUPT flag is always set by the system when using.MS sigaction 3 in POSIX mode. The flag is set so that interrupted system calls willfail with the EINTR error instead of getting restarted..SH Return ValuesA 0 return value indicated that the call succeeded. A \-1 return valueindicates an error occurred and.I errnois set to indicated the reason..SH Diagnostics.NXR "sigaction system call" "diagnostics"The.PN sigactionsystem callfails and a new signal handler is not installed if oneof the following occurs:.TP 15[EFAULT]Either.I vecor .I ovecpoints to memory which is not a valid part of the processaddress space..TP 15[EINVAL].I Sigis not a valid signal number..TP 15[EINVAL]An attempt is made to ignore or supply a handler for SIGKILLor SIGSTOP..SH See Alsosigvec(2), sigsetops(3), sigprocmask(3),sigsuspend(3), sigpending(2), setjmp(3), siginterrupt(3), tty(4).NXE "sigaction system call".NXE "signal handler" "assigning"
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?