Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Polish Proc methods that expect the Proc to be done
Affects methods .status, .Numeric, .Bool, .exitcode, and .sink. Fixes module build installation failures and RT#125757: https://rt.perl.org/Ticket/Display.html?id=125757#ticket-history Even before Proc refactor, we had some issues where users would call, say, .exitcode, and expect the exitcode, but .out/.err pipes were still open, so the .exitcode was wrong. The Proc refactor exacerbated the issue, as now the user had to ensure the opened pipes were closed when a call to one of the affected methods listed above were made or a Proc was sunk. Fix by waiting for the proc to finish up when any of the affected methods are called. The one extra thing we can do is also close .stdin of the proc, but I'm not 100% sure if we should. Also, the current method is a bit fragile, in that setting $exitcode when instantiating the Proc to anything but -1 will not await for proc to be completed and won't update the exitcode...
- Loading branch information
1 parent
14d7571
commit e4468c6
Showing
1 changed file
with
36 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters