Sorry, I discovered that the reaper wasn't working properly, and that slightly more radical changes were necessary. I've attached a new version of the patch set. The only patch that changed here is the last one, but I include all of them again for simplicity. I deleted the old 'wip-thread-safe-popen' branch and pushed a new one called 'thread-safe-popen', because I believe this one finally does the entire job correctly. Mark