On 25/07/15 00:29, Alexander Kjeldaas wrote: > I think CLOEXEC should be the default, but it doesn't seem to solve your > problem. What if thread 2 executes "myBinary" before thread 1 called exec()? I'm not sure I understand your scenario - does it change the problem?