diff options
author | doktornotor <notordoktor@gmail.com> | 2017-02-24 17:25:40 +0100 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2017-03-02 16:25:31 -0300 |
commit | a1147a30a44253171daa3a44b9e5d412790f49b5 (patch) | |
tree | 82d129855165b328e64ba2d650d5943a95d91b1b | |
parent | 390797067f7e26b2f54a87a4850a2d855e835da0 (diff) | |
download | pfsense-a1147a30a44253171daa3a44b9e5d412790f49b5.zip pfsense-a1147a30a44253171daa3a44b9e5d412790f49b5.tar.gz |
Fix the pkg_call() and set the timeout to a sane value (Bug #6594)
(cherry picked from commit 9c91c7bd747074b8cdaa90e8810f0c2df081f72d)
-rw-r--r-- | src/etc/inc/pkg-utils.inc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/etc/inc/pkg-utils.inc b/src/etc/inc/pkg-utils.inc index ef3e7b8..cda5517 100644 --- a/src/etc/inc/pkg-utils.inc +++ b/src/etc/inc/pkg-utils.inc @@ -171,7 +171,7 @@ function pkg_call($params, $mute = false, $extra_env = array()) { stream_set_blocking($pipes[2], 0); /* XXX: should be a tunnable? */ - $timeout = 300; // seconds + $timeout = 60; // seconds $error_log = ''; do { @@ -179,7 +179,7 @@ function pkg_call($params, $mute = false, $extra_env = array()) { $read = array($pipes[1], $pipes[2]); $except = array(); - $stream = stream_select($read, $write, $except, null, $timeout); + $stream = stream_select($read, $write, $except, $timeout); if ($stream !== FALSE && $stream > 0) { foreach ($read as $pipe) { $content = stream_get_contents($pipe); |