Module Name: src Committed By: christos Date: Sat Oct 31 17:45:33 UTC 2015
Modified Files: src/lib/libc/sys: sigaction.2 Log Message: mention what we are allowed to do. To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/lib/libc/sys/sigaction.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libc/sys/sigaction.2 diff -u src/lib/libc/sys/sigaction.2:1.45 src/lib/libc/sys/sigaction.2:1.46 --- src/lib/libc/sys/sigaction.2:1.45 Sat Jan 4 10:54:27 2014 +++ src/lib/libc/sys/sigaction.2 Sat Oct 31 13:45:32 2015 @@ -1,4 +1,4 @@ -.\" $NetBSD: sigaction.2,v 1.45 2014/01/04 15:54:27 wiz Exp $ +.\" $NetBSD: sigaction.2,v 1.46 2015/10/31 17:45:32 christos Exp $ .\" .\" Copyright (c) 1980, 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)sigaction.2 8.2 (Berkeley) 4/3/94 .\" -.Dd June 3, 2006 +.Dd October 31, 2015 .Dt SIGACTION 2 .Os .Sh NAME @@ -287,6 +287,22 @@ flag in .Xr termios 4 . .El .Pp +If the signal handler is called due to signal delively resulting from reasons +other than direct calls to +.Xr kill 2 +or +.Xr _lwp_kill 2 +or indirect calls to +.Xr _lwp_kill 2 +via +.Xr abort 3 +or +.Xr raise 3 +any activity (such as calling functions or assigning variables in the global +or static scopes) other than setting a variable of the type +.Dt volatile sig_atomic_t +is undefined. +.Pp Only functions that are async-signal-safe can safely be used in signal handlers; see .Xr signal 7