Please sign in to comment.
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...