Skip to content

Commit b0f47c6

Browse files
committed
Update OSFunctions.php
1 parent 3df242e commit b0f47c6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Civ13/OSFunctions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public static function execInBackground(string $cmd): PromiseInterface
8484
}
8585
if (! $proc = proc_open($cmd, self::DEFAULT_PIPES, $pipes)) return reject(new MissingSystemPermissionException('proc_open() failed')); // old method was "sudo nohup $cmd > /dev/null &"
8686
self::setNonblock($pipes);
87-
self::readPipes($pipes);
87+
//self::readPipes($pipes);
8888
if (! $proc_details = proc_get_status($proc)) return reject(new MissingSystemPermissionException('proc_get_status() failed'));
8989
if (! isset($proc_details['pid']) || ! $pid = $proc_details['pid']) return reject(new MissingSystemPermissionException('proc_get_status() did not return a PID'));
9090
error_log("Executing external shell command `$cmd` with PID $pid");
@@ -109,7 +109,7 @@ public static function restart(string $file = 'bot.php'): PromiseInterface
109109
}
110110
if (($proc = proc_open($output = "sudo nohup php \"$file\" > botlog.txt &", self::DEFAULT_PIPES, $pipes)) === false) return reject(new MissingSystemPermissionException('proc_open() failed'));
111111
self::setNonblock($pipes);
112-
self::readPipes($pipes);
112+
//self::readPipes($pipes);
113113
if (! $pid = proc_get_status($proc)['pid']) return reject(new MissingSystemPermissionException('proc_get_status() failed'));
114114
error_log("Executing external shell command `$output` with PID $pid");
115115
return resolve($proc);

0 commit comments

Comments
 (0)