xref: /freebsd-11-stable/lib/libc/sys/sigaction.2 (revision 152d791f66e291ba51bfab8dafe275d4c6fd5a80)
1.\" Copyright (c) 1980, 1990, 1993
2.\"	The Regents of the University of California.  All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\" 4. Neither the name of the University nor the names of its contributors
13.\"    may be used to endorse or promote products derived from this software
14.\"    without specific prior written permission.
15.\"
16.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26.\" SUCH DAMAGE.
27.\"
28.\"	From: @(#)sigaction.2	8.2 (Berkeley) 4/3/94
29.\" $FreeBSD$
30.\"
31.Dd September 30, 2016
32.Dt SIGACTION 2
33.Os
34.Sh NAME
35.Nm sigaction
36.Nd software signal facilities
37.Sh LIBRARY
38.Lb libc
39.Sh SYNOPSIS
40.In signal.h
41.Bd -literal
42struct  sigaction {
43        void    (*sa_handler)(int);
44        void    (*sa_sigaction)(int, siginfo_t *, void *);
45        int     sa_flags;               /* see signal options below */
46        sigset_t sa_mask;               /* signal mask to apply */
47};
48.Ed
49.Ft int
50.Fo sigaction
51.Fa "int sig"
52.Fa "const struct sigaction * restrict act"
53.Fa "struct sigaction * restrict oact"
54.Fc
55.Sh DESCRIPTION
56The system defines a set of signals that may be delivered to a process.
57Signal delivery resembles the occurrence of a hardware interrupt:
58the signal is normally blocked from further occurrence, the current thread
59context is saved, and a new one is built.
60A process may specify a
61.Em handler
62to which a signal is delivered, or specify that a signal is to be
63.Em ignored .
64A process may also specify that a default action is to be taken
65by the system when a signal occurs.
66A signal may also be
67.Em blocked
68for a thread,
69in which case it will not be delivered to that thread until it is
70.Em unblocked .
71The action to be taken on delivery is determined at the time
72of delivery.
73Normally, signal handlers execute on the current stack
74of the thread.
75This may be changed, on a per-handler basis,
76so that signals are taken on a special
77.Em "signal stack" .
78.Pp
79Signal routines normally execute with the signal that caused their
80invocation
81.Em blocked ,
82but other signals may yet occur.
83A global
84.Em "signal mask"
85defines the set of signals currently blocked from delivery
86to a thread.
87The signal mask for a thread is initialized
88from that of its parent (normally empty).
89It may be changed with a
90.Xr sigprocmask 2
91or
92.Xr pthread_sigmask 3
93call, or when a signal is delivered to the thread.
94.Pp
95When a signal
96condition arises for a process or thread, the signal is added to a set of
97signals pending for the process or thread.
98Whether the signal is directed at the process in general or at a specific
99thread depends on how it is generated.
100For signals directed at a specific thread,
101if the signal is not currently
102.Em blocked
103by the thread then it is delivered to the thread.
104For signals directed at the process,
105if the signal is not currently
106.Em blocked
107by all threads then it is delivered to one thread that does not have it blocked
108(the selection of which is unspecified).
109Signals may be delivered any time a thread enters the operating system
110(e.g., during a system call, page fault or trap, or clock interrupt).
111If multiple signals are ready to be delivered at the same time,
112any signals that could be caused by traps are delivered first.
113Additional signals may be processed at the same time, with each
114appearing to interrupt the handlers for the previous signals
115before their first instructions.
116The set of pending signals is returned by the
117.Xr sigpending 2
118system call.
119When a caught signal
120is delivered, the current state of the thread is saved,
121a new signal mask is calculated (as described below),
122and the signal handler is invoked.
123The call to the handler
124is arranged so that if the signal handling routine returns
125normally the thread will resume execution in the context
126from before the signal's delivery.
127If the thread wishes to resume in a different context, then it
128must arrange to restore the previous context itself.
129.Pp
130When a signal is delivered to a thread a new signal mask is
131installed for the duration of the process' signal handler
132(or until a
133.Xr sigprocmask 2
134system call is made).
135This mask is formed by taking the union of the current signal mask set,
136the signal to be delivered, and
137the signal mask associated with the handler to be invoked.
138.Pp
139The
140.Fn sigaction
141system call
142assigns an action for a signal specified by
143.Fa sig .
144If
145.Fa act
146is non-zero, it
147specifies an action
148.Dv ( SIG_DFL ,
149.Dv SIG_IGN ,
150or a handler routine) and mask
151to be used when delivering the specified signal.
152If
153.Fa oact
154is non-zero, the previous handling information for the signal
155is returned to the user.
156.Pp
157The above declaration of
158.Vt "struct sigaction"
159is not literal.
160It is provided only to list the accessible members.
161See
162.In sys/signal.h
163for the actual definition.
164In particular, the storage occupied by sa_handler and sa_sigaction overlaps,
165and an application can not use both simultaneously.
166.Pp
167Once a signal handler is installed, it normally remains installed
168until another
169.Fn sigaction
170system call is made, or an
171.Xr execve 2
172is performed.
173A signal-specific default action may be reset by
174setting
175.Va sa_handler
176to
177.Dv SIG_DFL .
178The defaults are process termination, possibly with core dump;
179no action; stopping the process; or continuing the process.
180See the signal list below for each signal's default action.
181If
182.Va sa_handler
183is
184.Dv SIG_DFL ,
185the default action for the signal is to discard the signal,
186and if a signal is pending,
187the pending signal is discarded even if the signal is masked.
188If
189.Va sa_handler
190is set to
191.Dv SIG_IGN
192current and pending instances
193of the signal are ignored and discarded.
194.Pp
195Options may be specified by setting
196.Va sa_flags .
197The meaning of the various bits is as follows:
198.Bl -tag -offset indent -width SA_RESETHANDXX
199.It Dv SA_NOCLDSTOP
200If this bit is set when installing a catching function
201for the
202.Dv SIGCHLD
203signal,
204the
205.Dv SIGCHLD
206signal will be generated only when a child process exits,
207not when a child process stops.
208.It Dv SA_NOCLDWAIT
209If this bit is set when calling
210.Fn sigaction
211for the
212.Dv SIGCHLD
213signal, the system will not create zombie processes when children of
214the calling process exit.
215If the calling process subsequently issues a
216.Xr wait 2
217(or equivalent), it blocks until all of the calling process's child
218processes terminate, and then returns a value of \-1 with
219.Va errno
220set to
221.Er ECHILD .
222The same effect of avoiding zombie creation can also be achieved by setting
223.Va sa_handler
224for
225.Dv SIGCHLD
226to
227.Dv SIG_IGN .
228.It Dv SA_ONSTACK
229If this bit is set, the system will deliver the signal to the process
230on a
231.Em "signal stack" ,
232specified by each thread with
233.Xr sigaltstack 2 .
234.It Dv SA_NODEFER
235If this bit is set, further occurrences of the delivered signal are
236not masked during the execution of the handler.
237.It Dv SA_RESETHAND
238If this bit is set, the handler is reset back to
239.Dv SIG_DFL
240at the moment the signal is delivered.
241.It Dv SA_RESTART
242See paragraph below.
243.It Dv SA_SIGINFO
244If this bit is set, the handler function is assumed to be pointed to by the
245.Va sa_sigaction
246member of
247.Vt "struct sigaction"
248and should match the prototype shown above or as below in
249.Sx EXAMPLES .
250This bit should not be set when assigning
251.Dv SIG_DFL
252or
253.Dv SIG_IGN .
254.El
255.Pp
256If a signal is caught during the system calls listed below,
257the call may be forced to terminate
258with the error
259.Er EINTR ,
260the call may return with a data transfer shorter than requested,
261or the call may be restarted.
262Restart of pending calls is requested
263by setting the
264.Dv SA_RESTART
265bit in
266.Va sa_flags .
267The affected system calls include
268.Xr open 2 ,
269.Xr read 2 ,
270.Xr write 2 ,
271.Xr sendto 2 ,
272.Xr recvfrom 2 ,
273.Xr sendmsg 2
274and
275.Xr recvmsg 2
276on a communications channel or a slow device (such as a terminal,
277but not a regular file)
278and during a
279.Xr wait 2
280or
281.Xr ioctl 2 .
282However, calls that have already committed are not restarted,
283but instead return a partial success (for example, a short read count).
284.Pp
285After a
286.Xr pthread_create 3
287the signal mask is inherited by the new thread and
288the set of pending signals and the signal stack for the new thread are empty.
289.Pp
290After a
291.Xr fork 2
292or
293.Xr vfork 2
294all signals, the signal mask, the signal stack,
295and the restart/interrupt flags are inherited by the child.
296.Pp
297The
298.Xr execve 2
299system call reinstates the default
300action for all signals which were caught and
301resets all signals to be caught on the user stack.
302Ignored signals remain ignored;
303the signal mask remains the same;
304signals that restart pending system calls continue to do so.
305.Pp
306The following is a list of all signals
307with names as in the include file
308.In signal.h :
309.Bl -column SIGVTALARMXX "create core imagexxx"
310.It Sy NAME Ta Sy Default Action Ta Sy Description
311.It Dv SIGHUP Ta terminate process Ta terminal line hangup
312.It Dv SIGINT Ta terminate process Ta interrupt program
313.It Dv SIGQUIT Ta create core image Ta quit program
314.It Dv SIGILL Ta create core image Ta illegal instruction
315.It Dv SIGTRAP Ta create core image Ta trace trap
316.It Dv SIGABRT Ta create core image Ta Xr abort 3 call (formerly Dv SIGIOT )
317.It Dv SIGEMT Ta create core image Ta emulate instruction executed
318.It Dv SIGFPE Ta create core image Ta floating-point exception
319.It Dv SIGKILL Ta terminate process Ta kill program
320.It Dv SIGBUS Ta create core image Ta bus error
321.It Dv SIGSEGV Ta create core image Ta segmentation violation
322.It Dv SIGSYS Ta create core image Ta non-existent system call invoked
323.It Dv SIGPIPE Ta terminate process Ta write on a pipe with no reader
324.It Dv SIGALRM Ta terminate process Ta real-time timer expired
325.It Dv SIGTERM Ta terminate process Ta software termination signal
326.It Dv SIGURG Ta discard signal Ta urgent condition present on socket
327.It Dv SIGSTOP Ta stop process Ta stop (cannot be caught or ignored)
328.It Dv SIGTSTP Ta stop process Ta stop signal generated from keyboard
329.It Dv SIGCONT Ta discard signal Ta continue after stop
330.It Dv SIGCHLD Ta discard signal Ta child status has changed
331.It Dv SIGTTIN Ta stop process Ta background read attempted from control terminal
332.It Dv SIGTTOU Ta stop process Ta background write attempted to control terminal
333.It Dv SIGIO Ta discard signal Ta I/O is possible on a descriptor (see Xr fcntl 2 )
334.It Dv SIGXCPU Ta terminate process Ta cpu time limit exceeded (see Xr setrlimit 2 )
335.It Dv SIGXFSZ Ta terminate process Ta file size limit exceeded (see Xr setrlimit 2 )
336.It Dv SIGVTALRM Ta terminate process Ta virtual time alarm (see Xr setitimer 2 )
337.It Dv SIGPROF Ta terminate process Ta profiling timer alarm (see Xr setitimer 2 )
338.It Dv SIGWINCH Ta discard signal Ta window size change
339.It Dv SIGINFO Ta discard signal Ta status request from keyboard
340.It Dv SIGUSR1 Ta terminate process Ta user defined signal 1
341.It Dv SIGUSR2 Ta terminate process Ta user defined signal 2
342.El
343.Sh NOTE
344The
345.Va sa_mask
346field specified in
347.Fa act
348is not allowed to block
349.Dv SIGKILL
350or
351.Dv SIGSTOP .
352Any attempt to do so will be silently ignored.
353.Pp
354The following functions are either reentrant or not interruptible
355by signals and are async-signal safe.
356Therefore applications may
357invoke them, without restriction, from signal-catching functions
358or from a child process after calling
359.Xr fork 2
360in a multi-threaded process:
361.Pp
362Base Interfaces:
363.Pp
364.Fn _Exit ,
365.Fn _exit ,
366.Fn accept ,
367.Fn access ,
368.Fn alarm ,
369.Fn bind ,
370.Fn cfgetispeed ,
371.Fn cfgetospeed ,
372.Fn cfsetispeed ,
373.Fn cfsetospeed ,
374.Fn chdir ,
375.Fn chmod ,
376.Fn chown ,
377.Fn close ,
378.Fn connect ,
379.Fn creat ,
380.Fn dup ,
381.Fn dup2 ,
382.Fn execl ,
383.Fn execle ,
384.Fn execv ,
385.Fn execve ,
386.Fn faccessat ,
387.Fn fchdir ,
388.Fn fchmod ,
389.Fn fchmodat ,
390.Fn fchown ,
391.Fn fchownat ,
392.Fn fcntl ,
393.Fn fork ,
394.Fn fstat ,
395.Fn fstatat ,
396.Fn fsync ,
397.Fn ftruncate ,
398.Fn getegid ,
399.Fn geteuid ,
400.Fn getgid ,
401.Fn getgroups ,
402.Fn getpeername ,
403.Fn getpgrp ,
404.Fn getpid ,
405.Fn getppid ,
406.Fn getsockname ,
407.Fn getsockopt ,
408.Fn getuid ,
409.Fn kill ,
410.Fn link ,
411.Fn linkat ,
412.Fn listen ,
413.Fn lseek ,
414.Fn lstat ,
415.Fn mkdir ,
416.Fn mkdirat ,
417.Fn mkfifo ,
418.Fn mkfifoat ,
419.Fn mknod ,
420.Fn mknodat ,
421.Fn open ,
422.Fn openat ,
423.Fn pause ,
424.Fn pipe ,
425.Fn poll ,
426.Fn pselect ,
427.Fn pthread_sigmask ,
428.Fn raise ,
429.Fn read ,
430.Fn readlink ,
431.Fn readlinkat ,
432.Fn recv ,
433.Fn recvfrom ,
434.Fn recvmsg ,
435.Fn rename ,
436.Fn renameat ,
437.Fn rmdir ,
438.Fn select ,
439.Fn send ,
440.Fn sendmsg ,
441.Fn sendto ,
442.Fn setgid ,
443.Fn setpgid ,
444.Fn setsid ,
445.Fn setsockopt ,
446.Fn setuid ,
447.Fn shutdown ,
448.Fn sigaction ,
449.Fn sigaddset ,
450.Fn sigdelset ,
451.Fn sigemptyset ,
452.Fn sigfillset ,
453.Fn sigismember ,
454.Fn signal ,
455.Fn sigpending ,
456.Fn sigprocmask ,
457.Fn sigsuspend ,
458.Fn sleep ,
459.Fn sockatmark ,
460.Fn socket ,
461.Fn socketpair ,
462.Fn stat ,
463.Fn symlink ,
464.Fn symlinkat ,
465.Fn tcdrain ,
466.Fn tcflow ,
467.Fn tcflush ,
468.Fn tcgetattr ,
469.Fn tcgetpgrp ,
470.Fn tcsendbreak ,
471.Fn tcsetattr ,
472.Fn tcsetpgrp ,
473.Fn time ,
474.Fn times ,
475.Fn umask ,
476.Fn uname ,
477.Fn unlink ,
478.Fn unlinkat ,
479.Fn utime ,
480.Fn wait ,
481.Fn waitpid ,
482.Fn write .
483.Pp
484X/Open Systems Interfaces:
485.Pp
486.Fn sigpause ,
487.Fn sigset ,
488.Fn utimes .
489.Pp
490Realtime Interfaces:
491.Pp
492.Fn aio_error ,
493.Fn clock_gettime ,
494.Fn timer_getoverrun ,
495.Fn aio_return ,
496.Fn fdatasync ,
497.Fn sigqueue ,
498.Fn timer_gettime ,
499.Fn aio_suspend ,
500.Fn sem_post ,
501.Fn timer_settime .
502.Pp
503Base Interfaces not specified as async-signal safe by
504.Tn POSIX :
505.Pp
506.Fn fpathconf ,
507.Fn pathconf ,
508.Fn sysconf .
509.Pp
510Base Interfaces not specified as async-signal safe by
511.Tn POSIX ,
512but planned to be:
513.Pp
514.Fn ffs ,
515.Fn htonl ,
516.Fn htons ,
517.Fn memccpy ,
518.Fn memchr ,
519.Fn memcmp ,
520.Fn memcpy ,
521.Fn memmove ,
522.Fn memset ,
523.Fn ntohl ,
524.Fn ntohs ,
525.Fn stpcpy ,
526.Fn stpncpy ,
527.Fn strcat ,
528.Fn strchr ,
529.Fn strcmp ,
530.Fn strcpy ,
531.Fn strcspn ,
532.Fn strlen ,
533.Fn strncat ,
534.Fn strncmp ,
535.Fn strncpy ,
536.Fn strnlen ,
537.Fn strpbrk ,
538.Fn strrchr ,
539.Fn strspn ,
540.Fn strstr ,
541.Fn strtok_r ,
542.Fn wcpcpy ,
543.Fn wcpncpy ,
544.Fn wcscat ,
545.Fn wcschr ,
546.Fn wcscmp ,
547.Fn wcscpy ,
548.Fn wcscspn ,
549.Fn wcslen ,
550.Fn wcsncat ,
551.Fn wcsncmp ,
552.Fn wcsncpy ,
553.Fn wcsnlen ,
554.Fn wcspbrk ,
555.Fn wcsrchr ,
556.Fn wcsspn ,
557.Fn wcsstr ,
558.Fn wcstok ,
559.Fn wmemchr ,
560.Fn wmemcmp ,
561.Fn wmemcpy ,
562.Fn wmemmove ,
563.Fn wmemset .
564.Pp
565Extension Interfaces:
566.Pp
567.Fn accept4 ,
568.Fn bindat ,
569.Fn closefrom ,
570.Fn connectat ,
571.Fn eaccess ,
572.Fn ffsl ,
573.Fn ffsll ,
574.Fn flock ,
575.Fn fls ,
576.Fn flsl ,
577.Fn flsll ,
578.Fn futimesat ,
579.Fn pipe2 ,
580.Fn strlcat .
581.Fn strlcpy ,
582.Fn strsep .
583.Pp
584In addition, reading or writing
585.Va errno
586is async-signal safe.
587.Pp
588All functions not in the above lists are considered to be unsafe
589with respect to signals.
590That is to say, the behaviour of such
591functions is undefined when they are called from a signal handler
592that interrupted an unsafe function.
593In general though, signal handlers should do little more than set a
594flag; most other actions are not safe.
595.Pp
596Also, it is good practice to make a copy of the global variable
597.Va errno
598and restore it before returning from the signal handler.
599This protects against the side effect of
600.Va errno
601being set by functions called from inside the signal handler.
602.Sh RETURN VALUES
603.Rv -std sigaction
604.Sh EXAMPLES
605There are three possible prototypes the handler may match:
606.Bl -tag -offset indent -width short
607.It Tn ANSI C :
608.Ft void
609.Fn handler int ;
610.It Traditional BSD style:
611.Ft void
612.Fn handler int "int code" "struct sigcontext *scp" ;
613.It Tn POSIX Dv SA_SIGINFO :
614.Ft void
615.Fn handler int "siginfo_t *info" "ucontext_t *uap" ;
616.El
617.Pp
618The handler function should match the
619.Dv SA_SIGINFO
620prototype if the
621.Dv SA_SIGINFO
622bit is set in
623.Va sa_flags .
624It then should be pointed to by the
625.Va sa_sigaction
626member of
627.Vt "struct sigaction" .
628Note that you should not assign
629.Dv SIG_DFL
630or
631.Dv SIG_IGN
632this way.
633.Pp
634If the
635.Dv SA_SIGINFO
636flag is not set, the handler function should match
637either the
638.Tn ANSI C
639or traditional
640.Bx
641prototype and be pointed to by
642the
643.Va sa_handler
644member of
645.Vt "struct sigaction" .
646In practice,
647.Fx
648always sends the three arguments of the latter and since the
649.Tn ANSI C
650prototype is a subset, both will work.
651The
652.Va sa_handler
653member declaration in
654.Fx
655include files is that of
656.Tn ANSI C
657(as required by
658.Tn POSIX ) ,
659so a function pointer of a
660.Bx Ns -style
661function needs to be casted to
662compile without warning.
663The traditional
664.Bx
665style is not portable and since its capabilities
666are a full subset of a
667.Dv SA_SIGINFO
668handler,
669its use is deprecated.
670.Pp
671The
672.Fa sig
673argument is the signal number, one of the
674.Dv SIG...
675values from
676.In signal.h .
677.Pp
678The
679.Fa code
680argument of the
681.Bx Ns -style
682handler and the
683.Va si_code
684member of the
685.Fa info
686argument to a
687.Dv SA_SIGINFO
688handler contain a numeric code explaining the
689cause of the signal, usually one of the
690.Dv SI_...
691values from
692.In sys/signal.h
693or codes specific to a signal, i.e., one of the
694.Dv FPE_...
695values for
696.Dv SIGFPE .
697.Pp
698The
699.Fa scp
700argument to a
701.Bx Ns -style
702handler points to an instance of
703.Vt "struct sigcontext" .
704.Pp
705The
706.Fa uap
707argument to a
708.Tn POSIX
709.Dv SA_SIGINFO
710handler points to an instance of
711ucontext_t.
712.Sh ERRORS
713The
714.Fn sigaction
715system call
716will fail and no new signal handler will be installed if one
717of the following occurs:
718.Bl -tag -width Er
719.It Bq Er EINVAL
720The
721.Fa sig
722argument
723is not a valid signal number.
724.It Bq Er EINVAL
725An attempt is made to ignore or supply a handler for
726.Dv SIGKILL
727or
728.Dv SIGSTOP .
729.El
730.Sh SEE ALSO
731.Xr kill 1 ,
732.Xr kill 2 ,
733.Xr ptrace 2 ,
734.Xr setitimer 2 ,
735.Xr setrlimit 2 ,
736.Xr sigaltstack 2 ,
737.Xr sigpending 2 ,
738.Xr sigprocmask 2 ,
739.Xr sigsuspend 2 ,
740.Xr wait 2 ,
741.Xr fpsetmask 3 ,
742.Xr setjmp 3 ,
743.Xr siginfo 3 ,
744.Xr siginterrupt 3 ,
745.Xr sigsetops 3 ,
746.Xr ucontext 3 ,
747.Xr tty 4
748.Sh STANDARDS
749The
750.Fn sigaction
751system call is expected to conform to
752.St -p1003.1-90 .
753The
754.Dv SA_ONSTACK
755and
756.Dv SA_RESTART
757flags are Berkeley extensions,
758as are the signals,
759.Dv SIGTRAP ,
760.Dv SIGEMT ,
761.Dv SIGBUS ,
762.Dv SIGSYS ,
763.Dv SIGURG ,
764.Dv SIGIO ,
765.Dv SIGXCPU ,
766.Dv SIGXFSZ ,
767.Dv SIGVTALRM ,
768.Dv SIGPROF ,
769.Dv SIGWINCH ,
770and
771.Dv SIGINFO .
772Those signals are available on most
773.Bx Ns \-derived
774systems.
775The
776.Dv SA_NODEFER
777and
778.Dv SA_RESETHAND
779flags are intended for backwards compatibility with other operating
780systems.
781The
782.Dv SA_NOCLDSTOP ,
783and
784.Dv SA_NOCLDWAIT
785.\" and
786.\" SA_SIGINFO
787flags are featuring options commonly found in other operating systems.
788The flags are approved by
789.St -susv2 ,
790along with the option to avoid zombie creation by ignoring
791.Dv SIGCHLD .
792