diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-02-03 21:20:48 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-02-03 21:20:48 +0000 |
commit | 951966500a495fba5e231c84c031638012b156e9 (patch) | |
tree | efeca503781b89cb6522a45d1a7ffa98e135f003 /lib/libc/gen | |
parent | 62d083f2c5e53a0860b0464451f56cd8269121b9 (diff) |
some more functions that are (only on OpenBSD) safe in signal handlers.
not having access to these makes things really painful
Diffstat (limited to 'lib/libc/gen')
-rw-r--r-- | lib/libc/gen/signal.3 | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/lib/libc/gen/signal.3 b/lib/libc/gen/signal.3 index 550e3e5e46a..98248f5bac4 100644 --- a/lib/libc/gen/signal.3 +++ b/lib/libc/gen/signal.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: signal.3,v 1.18 2002/04/30 16:31:42 mpech Exp $ +.\" $OpenBSD: signal.3,v 1.19 2003/02/03 21:20:47 deraadt Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -337,7 +337,7 @@ Extension Interfaces: .Fn strlcat , .Fn syslog_r . .Pp -All functions not in the above lists are considered to be unsafe +Most functions not in the above lists are considered to be unsafe with respect to signals. That is to say, the behaviour of such functions when called from a signal handler is undefined. @@ -348,6 +348,20 @@ As well, inside the signal handler it is also considered more safe to make a copy the global variable .Va errno and restore it before returning from the signal handler. +.Pp +A few other functions are signal race safe in +.Ox +but probably not on other systems: +.Pp +.Bl -tag -offset indent -compact -width foofoofoofoo +.It Fn snprintf +Safe as long as $n positional arguments are not used. +.It Fn syslog_r +Safe if the +.Va syslog_data +struct is initialized as a local variable. +.El +.Pp .Sh RETURN VALUES The previous action is returned on a successful call. Otherwise, |