15 | | Now, if Proc1 tries to write to its OUT handle somewhere in between steps 3 and 5, it's likely that we will screw up `DosWrite` the way it happens in multi-threaded Python. Yes, this problem is different from this other case where output loss happens because the process writes to STDOUT which is temporarily redirected to a child's pipe because in this case data is still written to the right pipe (PIPE1 in the example above) even if the other end of the pipe is assigned a different handle in the child. However, I won't be surprised that there are bugs in `DosWrite` that may cause not only crashes but also data loss when it happens while the other end of the pipe is manipulated with `DosDupHandle`. I don't have any proof of that though, only a theoretical thought. |
| 15 | Now, if Proc1 tries to write to its OUT handle somewhere in between steps 3 and 5, it's likely that we will screw up `DosWrite` the way it happens in multi-threaded Python. Yes, this problem is different from that other case where output loss happens because the process writes to STDOUT which is temporarily redirected to a child's pipe since in this case data is still written to the right pipe (PIPE1 in the example above) even if the other end of the pipe is assigned a different handle in the child. However, I won't be surprised that there are bugs in `DosWrite` that may cause not only crashes but also data loss when it happens while the other end of the pipe is manipulated with `DosDupHandle`. I don't have any proof of that though, only a theoretical thought. |