Re: BUG (non-kernel), can hurt developers.
From: Andries . Brouwer
Date: Fri Nov 28 2003 - 05:31:03 EST
> I believe it would be very useful to have this information included
> in the standard Linux signal(2) manpage.
OK. You might have included a patch. I made it say
The effects of this call in a multi-threaded process are
unspecified.
The routine handler must be very careful, since processing
elsewhere was interrupted at some arbitrary point. POSIX
has the concept of "safe function". If a signal inter
rupts an unsafe function, and handler calls an unsafe
function, then the behavior is undefined. Safe functions
are listed explicitly in the various standards. The POSIX
1003.1-2003 list is
_Exit() _exit() abort() 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() fdata
sync() 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() sigdelset() sigemptyset() sigfillset() sigis
member() sleep() signal() sigpause() sigpending() sigproc
mask() sigqueue() sigset() sigsuspend() socket() socket
pair() stat() symlink() sysconf() tcdrain() tcflow()
tcflush() tcgetattr() tcgetpgrp() tcsendbreak() tcse
tattr() tcsetpgrp() time() timer_getoverrun() timer_get
time() timer_settime() times() umask() uname() unlink()
utime() wait() waitpid() write().
Andries
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/