From owner-cvs-all Wed Jul 25 13:54:43 2001 Delivered-To: cvs-all@freebsd.org Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (Postfix) with ESMTP id 7563837B405; Wed, 25 Jul 2001 13:54:34 -0700 (PDT) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.11.4/8.11.4) id f6PKsQe28558; Wed, 25 Jul 2001 16:54:26 -0400 (EDT) (envelope-from wollman) Date: Wed, 25 Jul 2001 16:54:26 -0400 (EDT) From: Garrett Wollman Message-Id: <200107252054.f6PKsQe28558@khavrinen.lcs.mit.edu> To: Warner Losh Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/lib/libc/sys sigaction.2 In-Reply-To: <200107251439.f6PEdro07401@harmony.village.org> References: <200107251439.f6PEdro07401@harmony.village.org> Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG < said: > In message 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