== _fork()_, _wait()_, and threads Something I've discovered through (painful) experience is that threaded programs cannot portably _fork()_ in one thread and then _wait()_ for the forked process in another one. This will work in some environments but fail explosively in others; the one I stubbed my toe on was a Linux 2.4 kernel based system (without [[NPTL ../linux/ThreadMemoryUse]], which is the usual state of affairs for 2.4-based Linux distributions). Admittedly, mixing threads and _fork()_ is a bit perverse, but sometimes it's what you need to do. (I saw this in a Python program, but Python isn't doing anything special in the POSIX threads department so I have to expect that it's completely generic.)