Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

child_process: close pipe ends that are re-piped #21209

Merged

Commits on Feb 6, 2019

  1. child_process: close pipe ends that are re-piped

    when t0 and t1 are spawned with t0's outputstream [1, 2] is piped into
    t1's input, a new pipe is created which uses a copy of the t0's fd.
    This leaves the original copy in Node parent, unattended. Net result is
    that when t0 produces data, it gets bifurcated into both the copies
    
    Detect the passed handle to be of 'wrap' type and close after the
    native spawn invocation by which time piping would have been over.
    
    Fixes: nodejs#9413
    Fixes: nodejs#18016
    
    PR-URL: nodejs#21209
    Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    gireeshpunathil committed Feb 6, 2019
    Configuration menu
    Copy the full SHA
    b1f82e4 View commit details
    Browse the repository at this point in the history