Skip to content

Commit cbcd478

Browse files
committed
Review Process
- Update constructor and `Process::withShellCommand()` parameters - Replace `null` input with an empty stream (`STDIN` must now be passed explicitly via `Process:pipeInput()`) - Improve robustness and precision of timeout handling and process termination - Add setter methods `setCwd()`, `setEnv()`, `setTimeout ()`, `disableOutputCollection()`, `enableOutputCollection()` - Add `Process::isTerminatedBySignal()` - In `Process::runWithoutFail()`, throw `ProcessFailedException` when a process returns a non-zero exit status - Throw `ProcessTerminatedBySignalException` when a process monitored by `Process::wait()` is terminated by a signal that isn't a `SIGTERM` or `SIGKILL` sent after calling `Process::stop()` - Throw `LogicException` instead of `ProcessException` where appropriate - Add `Process::getStats()` metrics - Fix output collection bugs - Update tests
1 parent 7788d8d commit cbcd478

File tree

5 files changed

+440
-183
lines changed

5 files changed

+440
-183
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php declare(strict_types=1);
2+
3+
namespace Salient\Core\Exception;
4+
5+
/**
6+
* @api
7+
*/
8+
class ProcessFailedException extends ProcessException {}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php declare(strict_types=1);
2+
3+
namespace Salient\Core\Exception;
4+
5+
/**
6+
* @api
7+
*/
8+
class ProcessTerminatedBySignalException extends ProcessException {}

0 commit comments

Comments
 (0)