1 Jun 2008 02:34
Re: sb-posix:fork does not take thread post-mortem cleanups into account
Faré <fahree <at> gmail.com>
2008-06-01 00:34:19 GMT
2008-06-01 00:34:19 GMT
When I read you write about fork and threads, I shudder. Fork should basically not be used when there are active threads. Not just the Lisp, but the libc, and any library that uses threads or mutexes (possibly including a threaded malloc) will be mighty confused. I'm not even sure you can use fork when there is but one thread left after others die (might or might not work in practice). In simple cases (static set of mutexes) you can survive with pthread_atfork (assuming lisp and all libraries play well with it). I wouldn't bet on it though. I don't know much about sbcl and its test suite, so I can't comment about the particulars. (PS: oh, and the sbcl implementation of run-program has a lot of scary race conditions. Playing games with aynchronous signal is braindead.) [ François-René ÐVB Rideau | Reflection&Cybernethics | http://fare.tunes.org ] Science is like sex: sometimes something useful comes out, but that is not the reason we are doing it -- Richard Feynman 2008/5/14 Nikodemus Siivola <nikodemus <at> random-state.net>: > I'm seeing a fair deal of hanging tests when building threaded on > Darwin. For ex ample, this > > sh run-tests.sh threads.pure.lisp clos-add-remove-method.impure.lisp > > reliably hangs in the first MAKE-THREAD call in the impure file: the > thread is spawned, and starts running, but MAKE-THREAD never returns.(Continue reading)
RSS Feed