> For a careful impl of fork-exec with threads, see > http://golang.org/src/pkg/syscall/exec_unix.go
I forgot to mention that this impl is indeed "correct" only because you cannot start thread or call fork() directly in the Go language, other than use goroutines and the ForkExec() function implemented there. So all that locking is internal. If you use threads and call fork(), you'll almost guaranteed to face with deadlocks. Perhaps not in a particular piece of code, but some others. Perhaps not on your laptop, but on the production machine with different kernels. Like most race conditions, they will eventually show up. -- http://mail.python.org/mailman/listinfo/python-list