Date: Wed, 25 Jul 2001 16:54:26 -0400 (EDT) From: Garrett Wollman <wollman@khavrinen.lcs.mit.edu> To: Warner Losh <imp@harmony.village.org> Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/lib/libc/sys sigaction.2 Message-ID: <200107252054.f6PKsQe28558@khavrinen.lcs.mit.edu> In-Reply-To: <200107251439.f6PEdro07401@harmony.village.org> References: <Pine.BSF.4.21.0107251900590.48176-100000@besplex.bde.org> <200107251439.f6PEdro07401@harmony.village.org>
next in thread | previous in thread | raw e-mail | index | archive | help
<<On Wed, 25 Jul 2001 08:39:53 -0600, Warner Losh <imp@harmony.village.org> said: > In message <Pine.BSF.4.21.0107251900590.48176-100000@besplex.bde.org> Bruce Evans writes: > : Only in our implementation. It's hard to see how strcpy() could be > : signal-unsafe, but POSIX doesn't require it to be signal-safe. > Strcpy isn't atomic. So if the source string changes in a signal > handler, unpredictable results will ensue. Indeed -- but that's not what the question is about. POSIX defines a specific set of functions which are guaranteed to be safe to call in signal handlers, and which are also guaranteed to be safely interruptible by signal handlers which only call functions in the set. (They must also be *either* reentrant *or* non-interruptible.) Those functions are the following: _Exit, _exit, accept, access, aio_error, aio_return, aio_suspend, alarm, bind, cfgetispeed, cfgetospeed, cfsetispeed, cfsetospeed, chdir, chmod, chown, clock_gettime, close, connect, creat, dup, dup2, execle, execve, fchmod, fchown, fcntl, fdatasync, fork, fpathconf, fstat, fsync, ftruncate, getegid, geteuid, getgid, getgroups, getpeername, getpgrp, getpid, getppid, getsockname, getsockopt, getuid, kill, link, listen, lseek, lstat, mkdir, mkfifo, open, pathconf, pause, pipe, poll, posix_trace_event, pselect, raise, read, readlink, recv, recvfrom, recvmsg, rename, rmdir, select, sem_post, send, sendmsg, sendto, setgid, setpgid, setsid, setsockopt, setuid, shutdown, sigaction, sigaddset, sigemptyset, sigfillset, sigismember, sleep, signal, sigpause, sigpending, sigprocmask, sigqueue, sigset, sigsuspend, socket, socketpair, stat, symlink, sysconf, tcdrain, fcflow, tcflush, tcgetattr, tcgetpgrp, tcsendbreak, tcsetattr, tcsetpgrp, time, timer_getoverrun, timer_gettime, timer_settime, times, umask, uname, unlink, utime, wait, waitpid, write This list is taken from draft 7, XSH page 481. -GAWollman To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200107252054.f6PKsQe28558>