You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've now twice been bitten by a bug around withProcess:
Use withProcess
Stream data from child process
Done
Problem: this creates a really subtle race condition where the child process may close its output handles and, before actually exiting, the parent process will hit closeProcess and then send a SIGTERM to the child.
The real problem is that withProcess is confusing in how it behaves. I propose instead having two new functions:
withProcessTerm, with the current behavior
withProcessWait, which will never send a SIGTERM, but instead wait for the child process to exit
Adding a deprecation message referring to these two new functions would have prevented a lot of head scratching in the two cases above.
The text was updated successfully, but these errors were encountered:
I've now twice been bitten by a bug around withProcess:
Problem: this creates a really subtle race condition where the child process may close its output handles and, before actually exiting, the parent process will hit
closeProcess
and then send a SIGTERM to the child.The real problem is that
withProcess
is confusing in how it behaves. I propose instead having two new functions:withProcessTerm
, with the current behaviorwithProcessWait
, which will never send a SIGTERM, but instead wait for the child process to exitAdding a deprecation message referring to these two new functions would have prevented a lot of head scratching in the two cases above.
The text was updated successfully, but these errors were encountered: