summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2012-05-15 16:35:03 -0400
committerjim-p <jimp@pfsense.org>2012-05-15 16:37:07 -0400
commit7dab8995dd939e0ab2fbbc517d2b6b4bcea0bc36 (patch)
treec6f01f6a2fa22dfd9e7d549da0279feb198f8abf
parentae26412f3d156989daa2196db92be2fa47a441b2 (diff)
downloadpfsense-7dab8995dd939e0ab2fbbc517d2b6b4bcea0bc36.zip
pfsense-7dab8995dd939e0ab2fbbc517d2b6b4bcea0bc36.tar.gz
Clear process signals before exec() or ntpd misbehaves if called from PHP on i386.
-rw-r--r--etc/inc/system.inc3
1 files changed, 3 insertions, 0 deletions
diff --git a/etc/inc/system.inc b/etc/inc/system.inc
index 4cd7cb2..bb7ed11 100644
--- a/etc/inc/system.inc
+++ b/etc/inc/system.inc
@@ -1287,7 +1287,10 @@ function system_ntp_configure() {
exec("/bin/mkdir -p /var/empty && chmod ug+rw /var/empty/.");
/* start opentpd, set time now and use /var/etc/ntpd.conf */
+ $oldset = array();
+ pcntl_sigprocmask(SIG_SETMASK, array(), $oldset);
exec("/usr/sbin/ntpd -g -c {$g['varetc_path']}/ntpd.conf");
+ pcntl_sigprocmask(SIG_SETMASK, $oldset);
// Note that we are starting up
log_error("NTPD is starting up.");
OpenPOWER on IntegriCloud