| @@ 50-60 (lines=11) @@ | ||
| 47 | ); |
|
| 48 | } |
|
| 49 | ||
| 50 | private function run(string $command): Str |
|
| 51 | { |
|
| 52 | $process = new Process($command); |
|
| 53 | $process->run(); |
|
| 54 | ||
| 55 | if (!$process->isSuccessful()) { |
|
| 56 | throw new MemoryUsageNotAccessible; |
|
| 57 | } |
|
| 58 | ||
| 59 | return new Str($process->getOutput()); |
|
| 60 | } |
|
| 61 | } |
|
| 62 | ||
| @@ 64-74 (lines=11) @@ | ||
| 61 | return $processes->get($pid->toInt()); |
|
| 62 | } |
|
| 63 | ||
| 64 | private function run(string $command): Str |
|
| 65 | { |
|
| 66 | $process = new SfProcess($command); |
|
| 67 | $process->run(); |
|
| 68 | ||
| 69 | if (!$process->isSuccessful()) { |
|
| 70 | throw new InformationNotAccessible; |
|
| 71 | } |
|
| 72 | ||
| 73 | return new Str($process->getOutput()); |
|
| 74 | } |
|
| 75 | ||
| 76 | /** |
|
| 77 | * @return MapInterface<int, Process> |
|