* Thread 1 writes its file completely (opens and closes an Fd 1, using O_CLOEXEC)
* Thread 2 starts writing its file (Fd 2 open for writing, using O_CLOEXEC)
* Thread 1 starts executing "myBinary" by calling fork(). Fd 2 is inherited by the child process
* Thread 2 finishes writing (closes its Fd 2)
* Thread 2 executes "myBinary", which fails with `Text file busy`
because an Fd is still open to it in the child of Process 1
* Thread 1 executes "myBinary" (calling exec()). Fd 2 is automatically closed during exec(), but it's too late.
You need the file descriptor to not be inherited by a child process, which is != from O_CLOEXEC.
Alexander