From f1926a01df8871cdacb29c97ffbfd7ff18d1610a Mon Sep 17 00:00:00 2001 From: Till Brehm <tbrehm@ispconfig.org> Date: Tue, 09 Feb 2016 11:56:40 -0500 Subject: [PATCH] Fixed problems that prevented ISPConfig to run on PHP 7, Issue #3716 --- server/plugins-available/mailman_plugin.inc.php | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/server/plugins-available/mailman_plugin.inc.php b/server/plugins-available/mailman_plugin.inc.php index 0d282f5..b15cd73 100644 --- a/server/plugins-available/mailman_plugin.inc.php +++ b/server/plugins-available/mailman_plugin.inc.php @@ -73,7 +73,15 @@ $this->update_config(); - exec("nohup /usr/lib/mailman/bin/newlist -u ".escapeshellcmd($data["new"]["domain"])." -e ".escapeshellcmd($data["new"]["domain"])." ".escapeshellcmd($data["new"]["listname"])." ".escapeshellcmd($data["new"]["email"])." ".escapeshellcmd($data["new"]["password"])." >/dev/null 2>&1 &"); + $pid = exec("nohup /usr/lib/mailman/bin/newlist -u ".escapeshellcmd($data["new"]["domain"])." -e ".escapeshellcmd($data["new"]["domain"])." ".escapeshellcmd($data["new"]["listname"])." ".escapeshellcmd($data["new"]["email"])." ".escapeshellcmd($data["new"]["password"])." >/dev/null 2>&1 & echo $!;"); + // wait for /usr/lib/mailman/bin/newlist-call + $running = true; + do { + exec('ps -p '.intval($pid), $out); + if (count($out) ==1) $running=false; else sleep(1); + unset($out); + } while ($running); + unset($out); if(is_file('/var/lib/mailman/data/virtual-mailman')) exec('postmap /var/lib/mailman/data/virtual-mailman'); if(is_file('/var/lib/mailman/data/transport-mailman')) exec('postmap /var/lib/mailman/data/transport-mailman'); exec('nohup '.$conf['init_scripts'] . '/' . 'mailman reload >/dev/null 2>&1 &'); -- Gitblit v1.9.1