--- /home/mrosenquist/Tools_WADF-0.12.1a/Tools/WADF.php	1970-01-01 10:13:24.000000000 +0100
+++ Tools/WADF.php	2009-07-17 10:51:39.000000000 +0100
@@ -690,12 +690,17 @@
 		}	
 	}
 	
-	public function restartWebserver()
+	public function restartWebserver($verbose=false)
 	{
 		$restart_cmd = $this->resolveMacro('webserver_restart_cmd');
 		if ($restart_cmd != '@webserver_restart_cmd@' && !empty($restart_cmd)) {
 			$this->_debugOutput("Restarting webserver...", self::DEBUG_GENERAL);
-			passthru($restart_cmd);
+			exec($restart_cmd, $out, $ret);
+			if ($ret != 0) {
+				throw new Exception('Error when Restarting webserver: ' . implode("\n", $out));
+			} elseif ($verbose) {
+				print implode("\n", $out);
+			}
 		}
 	}
 	
