CINXE.COM
sysv_signal
<html> <head> <title>sysv_signal</title> <META NAME="KEYWORDS" CONTENT="sysv_signal"> </head> <body BGCOLOR="#ffffff" LINK="#0000ff" VLINK="#0000ff" ALINK="#0000ff" TEXT="#000000"> <center> <h1><b>sysv_signal</b></h1></center> <PRE> <STRONG><A HREF="/man3/SYSV_SIGNAL">SYSV_SIGNAL(3)</A></STRONG> Linux Programmer's Manual <STRONG><A HREF="/man3/SYSV_SIGNAL">SYSV_SIGNAL(3)</A></STRONG> NAME sysv_signal - signal handling with System V semantics SYNOPSIS #define _GNU_SOURCE /* See <STRONG><A HREF="/man7/feature_test_macros">feature_test_macros(7)</A></STRONG> */ #include <signal.h> typedef void (*sighandler_t)(int); sighandler_t sysv_signal(int signum, sighandler_t handler); DESCRIPTION The sysv_signal() function takes the same arguments, and performs the same task, as <STRONG><A HREF="/man2/signal">signal(2)</A></STRONG>. However sysv_signal() provides the System V unreliable signal seman- tics, 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. RETURN VALUE The sysv_signal() function returns the previous value of the signal handler, or SIG_ERR on error. ERRORS As for <STRONG><A HREF="/man2/signal">signal(2)</A></STRONG>. ATTRIBUTES For an explanation of the terms used in this section, see at- <STRONG><A HREF="/man7/tributes">tributes(7)</A></STRONG>. +--------------+---------------+---------+ |Interface | Attribute | Value | +--------------+---------------+---------+ |sysv_signal() | Thread safety | MT-Safe | +--------------+---------------+---------+ CONFORMING TO This function is nonstandard. NOTES Use of sysv_signal() should be avoided; use <STRONG><A HREF="/man2/sigaction">sigaction(2)</A></STRONG> instead. On older Linux systems, sysv_signal() and <STRONG><A HREF="/man2/signal">signal(2)</A></STRONG> were equivalent. But on newer systems, <STRONG><A HREF="/man2/signal">signal(2)</A></STRONG> provides reliable signal semantics; see <STRONG><A HREF="/man2/signal">signal(2)</A></STRONG> for details. The use of sighandler_t is a GNU extension; this type is defined only if the _GNU_SOURCE feature test macro is defined. SEE ALSO <STRONG><A HREF="/man2/sigaction">sigaction(2)</A></STRONG>, <STRONG><A HREF="/man2/signal">signal(2)</A></STRONG>, <STRONG><A HREF="/man3/bsd_signal">bsd_signal(3)</A></STRONG>, <STRONG><A HREF="/man7/signal">signal(7)</A></STRONG> COLOPHON This page is part of release 5.05 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/. 2017-09-15 <STRONG><A HREF="/man3/SYSV_SIGNAL">SYSV_SIGNAL(3)</A></STRONG></PRE> <center> <h6>Man Pages Copyright Respective Owners. Site Copyright (C) 1994 - 2025 <a href="http://www.he.net">Hurricane Electric</a>. All Rights Reserved.</h6></center> </body> </html>