On Fri, Jan 13, 2012 at 10:09:04PM -0500, Rich Felker wrote: > sigprocmask alone is not sufficient to implement the required behavior > for system. In particular, in a multi-threaded program, another thread > will receive the signal and reap the child, causing system to > malfunction. Really there's no safe way to use system in a > multi-threaded program (or whatsoever, IMO), but to conform to POSIX > it must block SIGCHLD:
Agreed. This is why I didn't use pthread_sigmask(). I mention Linuxthreads because there are two variants of the system() function in uClibc, and the other one, which depends on defined __UCLIBC_HAS_THREADS_NATIVE__ && !defined __sparc__, isn't concerned by this issue. -- Richard Braun _______________________________________________ uClibc mailing list [email protected] http://lists.busybox.net/mailman/listinfo/uclibc
