child_process: add 'overlapped' stdio flag#29412
child_process: add 'overlapped' stdio flag#29412tarruda wants to merge 4 commits intonodejs:masterfrom
Conversation
9bbddd4 to
57c0f01
Compare
|
Why not just always set |
Yes, it can possibly break existing programs that run child process that are not prepared for overlapped I/O: libuv/libuv#95 (comment) |
57c0f01 to
d4eb7bc
Compare
|
Ok, perhaps we can just shorten the name to |
Added a fixup. If this is acceptable I will squash and edit the commit message. |
0a5b520 to
196c6ea
Compare
|
Can you also add a test for this? |
Do you have any suggestions on how I should proceed to testing this? The new option simply activates the I suppose I could just add a functional test that verifies overlapped I/O on the child process, but that would probably be duplicating one of the libuv tests. Also, the code path should be close to the one followed by the |
|
At the very least there should be a test that specifying |
👍 I also want to add a test that runs a C++ windows program that will not work if the stdio handles are not overlapped pipes. |
31ac422 to
e06685e
Compare
|
I've added "overlapped-checker", a program which is used to verify the |
9ad1420 to
a28f5a3
Compare
|
PR ready for final review. |
c654e7a to
7094378
Compare
|
Following @joaocgreis suggestion on how to make the test find overlapped-checker.exe:
|
|
it seems @joaocgreis's suggestion worked, rebasing on master a squashing the fixup |
|
@aduh95 Not sure if it helps, but I can try to explain the PR to make you more confident about merging. The "overlapped" stdio option is simply exposing libuv's Most of the code in the PR is dedicated to testing that the flag is passed correctly (AFAIR, libuv doesn't have any test covering it). The way the test works is that it will hang if the |
|
@aduh95 I've added a temporary commit that removes the "overlapped" flag. If you request-ci, we should see windows test hang |
aduh95
left a comment
There was a problem hiding this comment.
Thanks for the explanation, it's clear to me now.
Can you remove the timer from the test please? There is a default timeout set by the test.py script, so the timeout can be customized by the test runner.
Lines 1333 to 1334 in e57d8af
|
@tarruda Do you want to revert 45e83ab to have this ready to land? |
Removed it and added a fixup with the timeout removal on the tests |
|
@aduh95 |
Probably unrelated indeed, it happens sometimes. I've kicked off another CI to make sure. |
The 'overlapped' value sets the UV_OVERLAPPED_PIPE libuv flag in the child process stdio. Fixes: nodejs#29238
|
Landed in 25b21e4 🎉 |
|
Thanks @aduh95 @joaocgreis @bnoordhuis for the help with this PR |
The 'overlapped' value sets the UV_OVERLAPPED_PIPE libuv flag in the child process stdio.
Fixes: #29238
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes