-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
osutils: Do not hide errors of exec call in run() and run_diag()
This change does actually 3 changes. * It fix the issue poo#81828 [1], as it bypass the race error of `ReadWriteProcess(code => sub {})` (see: [2]) We now use `ReadWriteProcess(execute => '/foo')` as the `code=>sub{}` argument is intended to call perl code and not simply exec an external command. For instance if `exec` fail, perl throw an exception and this exception message is used in `_exit($@)` call, which doesn't looks like a sane exit-code. Using `execute=>''` gives us the exception directly and we can handle it properly! * It show the output of the executed process. * run_diag() show a stacktrace if someone try to run a command which does not exists. [1] https://progress.opensuse.org/issues/81828 [2] openSUSE/Mojo-IOLoop-ReadWriteProcess#18
- Loading branch information
Showing
3 changed files
with
53 additions
and
22 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
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
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