From ac4bc5853f75a8f8467f5c53704f33e2066c3da6 Mon Sep 17 00:00:00 2001 From: jim-p Date: Tue, 15 May 2012 16:35:03 -0400 Subject: Clear process signals before exec() or ntpd misbehaves if called from PHP on i386. --- etc/inc/system.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/etc/inc/system.inc b/etc/inc/system.inc index 22efd22..7807ef0 100644 --- a/etc/inc/system.inc +++ b/etc/inc/system.inc @@ -1141,7 +1141,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."); -- cgit v1.1