attempt to work around restrictions with fork() & pthreads
In the child process, call exec() directly instead of using System.Cmd.system, which involves another fork()/exec() and a non-blocking wait. The problem is that in a forked child of a threaded process, it isn't safe to do much except exec() according to POSIX. In fact calling pthread_create() in the child causes the pthread library to fail with an error on FreeBSD.
Showing with 12 additions and 5 deletions