2007-09-20 06:52:22 +00:00
|
|
|
.\" Copyright (c) 2007 Michael Kerrisk <mtk.manpages@gmail.com>
|
2007-05-04 21:18:57 +00:00
|
|
|
.\"
|
|
|
|
.\" Permission is granted to make and distribute verbatim copies of this
|
|
|
|
.\" manual provided the copyright notice and this permission notice are
|
|
|
|
.\" preserved on all copies.
|
|
|
|
.\"
|
|
|
|
.\" Permission is granted to copy and distribute modified versions of this
|
|
|
|
.\" manual under the conditions for verbatim copying, provided that the
|
|
|
|
.\" entire resulting derived work is distributed under the terms of a
|
|
|
|
.\" permission notice identical to this one.
|
|
|
|
.\"
|
|
|
|
.\" Since the Linux kernel and libraries are constantly changing, this
|
|
|
|
.\" manual page may be incorrect or out-of-date. The author(s) assume no
|
|
|
|
.\" responsibility for errors or omissions, or for damages resulting from
|
|
|
|
.\" the use of the information contained herein. The author(s) may not
|
|
|
|
.\" have taken the same level of care in the production of this manual,
|
|
|
|
.\" which is licensed free of charge, as they might when working
|
|
|
|
.\" professionally.
|
|
|
|
.\"
|
|
|
|
.\" Formatted or processed versions of this manual, if unaccompanied by
|
|
|
|
.\" the source, must acknowledge the copyright and authors of this work.
|
|
|
|
.\"
|
2007-05-27 20:50:13 +00:00
|
|
|
.TH SYSV_SIGNAL 3 2007-05-04 "" "Linux Programmer's Manual"
|
2007-05-04 21:18:57 +00:00
|
|
|
.SH NAME
|
|
|
|
sysv_signal \- signal handling with System V semantics
|
|
|
|
.SH SYNOPSIS
|
getresuid.2, mremap.2, poll.2, remap_file_pages.2, setresuid.2, splice.2, sync_file_range.2, syscall.2, tee.2, vmsplice.2, INFINITY.3, aio_init.3, asprintf.3, assert_perror.3, basename.3, bsd_signal.3, canonicalize_file_name.3, clog10.3, crypt.3, dl_iterate_phdr.3, dlopen.3, encrypt.3, exp10.3, fcloseall.3, fenv.3, fopencookie.3, ftw.3, getaddrinfo_a.3, getloadavg.3, getutent.3, grantpt.3, hsearch.3, lseek64.3, memmem.3, mempcpy.3, pow10.3, program_invocation_name.3, ptsname.3, putgrent.3, sched_getcpu.3, sincos.3, strchr.3, strfry.3, strnlen.3, strptime.3, strstr.3, strverscmp.3, swab.3, sysv_signal.3, tsearch.3, unlockpt.3, wcwidth.3: Add reference to feature_test_macros(7)
Some pages simply list feature test macro requirements in
the form:
#define #GNU_SOURCE
#include <someheader.h>
For these pages, add a "See feature_test_macros(7)" comment
on the "#define" line.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2010-10-31 04:31:47 +00:00
|
|
|
.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
|
2007-05-04 21:18:57 +00:00
|
|
|
.br
|
|
|
|
.B #include <signal.h>
|
|
|
|
.sp
|
|
|
|
.B typedef void (*sighandler_t)(int);
|
|
|
|
.sp
|
|
|
|
.BI "sighandler_t sysv_signal(int " signum ", sighandler_t " handler );
|
|
|
|
.SH DESCRIPTION
|
|
|
|
The
|
|
|
|
.BR sysv_signal ()
|
|
|
|
function takes the same arguments, and performs the same task, as
|
|
|
|
.BR signal (2).
|
|
|
|
|
|
|
|
However
|
|
|
|
.BR sysv_signal ()
|
|
|
|
provides the System V unreliable signal semantics, that is:
|
|
|
|
a) the disposition of the signal is reset to the default
|
|
|
|
when the handler is invoked;
|
|
|
|
b) delivery of further instances of the signal is not blocked while
|
|
|
|
the signal handler is executing; and
|
|
|
|
c) if the handler interrupts (certain) blocking system calls,
|
|
|
|
then the system call is not automatically restarted.
|
|
|
|
.SH "RETURN VALUE"
|
|
|
|
The
|
|
|
|
.BR sysv_signal ()
|
|
|
|
function returns the previous value of the signal handler, or
|
|
|
|
.B SIG_ERR
|
|
|
|
on error.
|
|
|
|
.SH ERRORS
|
|
|
|
As for
|
|
|
|
.BR signal (2).
|
2007-05-19 04:30:20 +00:00
|
|
|
.SH "CONFORMING TO"
|
accept.2, execve.2, futimesat.2, getresuid.2, getrlimit.2, madvise.2, mq_getsetattr.2, msgctl.2, nice.2, open.2, poll.2, setresuid.2, shmctl.2, sigaction.2, times.2, utimensat.2, __setfpucw.3, atoi.3, endian.3, err.3, euidaccess.3, fenv.3, fopencookie.3, fpurge.3, getgrouplist.3, getutmp.3, j0.3, lgamma.3, netlink.3, pthread_attr_init.3, pthread_attr_setaffinity_np.3, pthread_cleanup_push_defer_np.3, pthread_getattr_np.3, pthread_kill_other_threads_np.3, pthread_setaffinity_np.3, pthread_tryjoin_np.3, pthread_yield.3, random_r.3, readdir.3, rtnetlink.3, scanf.3, setenv.3, significand.3, sigsetops.3, strerror.3, strstr.3, sysv_signal.3, termios.3, timegm.3, unlocked_stdio.3, y0.3, locale.5, bootparam.7, feature_test_macros.7, ip.7, locale.7, pthreads.7, rtld-audit.7, nscd.8: Global fix: s/non-standard/nonstandard/
The tendency in English, as prescribed in style guides like
Chicago MoS, is towards removing hyphens after prefixes
like "non-" etc.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2010-01-16 16:37:52 +00:00
|
|
|
This function is nonstandard.
|
2007-05-04 21:18:57 +00:00
|
|
|
.SH NOTES
|
|
|
|
Use of
|
|
|
|
.BR sysv_signal ()
|
|
|
|
should be avoided; use
|
|
|
|
.BR sigaction (2)
|
|
|
|
instead.
|
|
|
|
|
|
|
|
On older Linux systems,
|
|
|
|
.BR sysv_signal ()
|
|
|
|
and
|
|
|
|
.BR signal (2)
|
|
|
|
were equivalent.
|
2007-06-21 22:55:04 +00:00
|
|
|
But on newer systems,
|
2007-05-04 21:18:57 +00:00
|
|
|
.BR signal (2)
|
|
|
|
provides reliable signal semantics; see
|
|
|
|
.BR signal (2)
|
|
|
|
for details.
|
|
|
|
|
|
|
|
The use of
|
2007-06-23 07:56:56 +00:00
|
|
|
.I sighandler_t
|
2007-05-04 21:18:57 +00:00
|
|
|
is a GNU extension;
|
2007-06-21 22:55:04 +00:00
|
|
|
this type is only defined if
|
2007-06-22 17:42:06 +00:00
|
|
|
the
|
|
|
|
.B _GNU_SOURCE
|
|
|
|
feature test macro is defined.
|
2007-05-04 21:18:57 +00:00
|
|
|
.SH "SEE ALSO"
|
|
|
|
.BR sigaction (2),
|
|
|
|
.BR signal (2),
|
|
|
|
.BR bsd_signal (3),
|
|
|
|
.BR signal (7)
|