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
{{ message }}
This repository has been archived by the owner on May 4, 2018. It is now read-only.
I'm trying to spawn a child process whose stdout and stderr are both redirected to the same file. I'm opening the file in the parent process and assigning the same fd to both options.stdio[1].data.fd and options.stdio[2].data.fd. The child process executes correctly, but only stdout ends up going to the file.
I believe the problem is because the original fd is being closed immediately after being duplicated in uv__process_child_init. So stdout is duplicated correctly, but when it loops back round to do the same for stderr the fd is no longer valid.
I'm trying to spawn a child process whose stdout and stderr are both redirected to the same file. I'm opening the file in the parent process and assigning the same fd to both options.stdio[1].data.fd and options.stdio[2].data.fd. The child process executes correctly, but only stdout ends up going to the file.
I believe the problem is because the original fd is being closed immediately after being duplicated in uv__process_child_init. So stdout is duplicated correctly, but when it loops back round to do the same for stderr the fd is no longer valid.
libuv/src/unix/process.c
Lines 311 to 312 in 0635e29
I modified one of the existing tests to illustrate the problem
The text was updated successfully, but these errors were encountered: