-
Notifications
You must be signed in to change notification settings - Fork 20
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
Perl crash/hang with fork in code to capture/tee on Windows #12
Comments
Thanks for the report. I might have to document that as unsupported. It falls under the warning about "Don't modify handles during a capture" and a fork definitely messes with the handles! :-) |
Maybe it would be possible to replace the default |
Although @dagolden is aware of that, just to keep this thread with all the data: this "bug" is a problem for Smoke testing under Windows. |
Note to self: the hang is at the "wait" in the tee-killing function, which blocks indefinitely. Something about the fork means the tee processes never see EOF. |
Wild speculating: I suspect by EOF you mean closing of the relevant process. I'd suspect in the case the issue is simply that on windows forks are not processes, but threads in the same process, meaning the tee processes would need to watch thread ids? |
I followed the breadcrumbs from Smart::Options to Module::Build::Pluggable::CPANfile to here. If the code input to one of the capture routines contains a fork, Perl crashes. Fork also makes the tee methods hang indefinitely. A simple script to illustrate:
I wish I could contribute, but having gone down the rabbit hole I've found myself in the much more advanced bat cave :) All I know, from checking with print statements, is that the crash/hang occurs inside of the
@result = $code->()
statement, on line 363, in the_capture_tee
method.perl -V
:The text was updated successfully, but these errors were encountered: