diff options
author | PiBa-NL <pba_2k3@yahoo.com> | 2017-01-09 22:37:35 +0100 |
---|---|---|
committer | PiBa-NL <pba_2k3@yahoo.com> | 2017-01-09 22:37:35 +0100 |
commit | a1b39e949ab3a0e53ac4c1837f5d2c02b28142f3 (patch) | |
tree | 7f62cb1b51b9f262b5ad57bb5421a9be62017db8 /src | |
parent | 8845e137b630497d47a8ce93fb072e47419f8af5 (diff) | |
download | pfsense-a1b39e949ab3a0e53ac4c1837f5d2c02b28142f3.zip pfsense-a1b39e949ab3a0e53ac4c1837f5d2c02b28142f3.tar.gz |
openvpn, check for valid pid using isvalidpid()
Diffstat (limited to 'src')
-rw-r--r-- | src/etc/inc/openvpn.inc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/etc/inc/openvpn.inc b/src/etc/inc/openvpn.inc index 8ed1414..c7355cb 100644 --- a/src/etc/inc/openvpn.inc +++ b/src/etc/inc/openvpn.inc @@ -1245,11 +1245,9 @@ function openvpn_restart($mode, $settings) { $i = 0; $pid = "--"; while ($i < 3000) { - if (file_exists($pfile) ) { + if (isvalidpid($pfile)) { $pid = rtrim(file_get_contents($pfile)); - if (is_numericint($pid)) { - break; - } + break; } usleep(1000); $i++; |