Log ajaxterm output

This commit is contained in:
Jamie Cameron
2010-02-03 18:10:26 -08:00
parent 5ab5ff1655
commit d518ac6dcb

View File

@@ -32,9 +32,10 @@ close(TEST);
$pid = fork();
if (!$pid) {
chdir("$module_root_directory/ajaxterm");
$logfile = $ENV{'WEBMIN_VAR'}.'/ajaxterm.log';
untie(*STDIN); open(STDIN, "</dev/null");
untie(*STDOUT); open(STDOUT, ">/dev/null");
untie(*STDERR); open(STDERR, ">/dev/null");
untie(*STDOUT); open(STDOUT, ">$logfile");
untie(*STDERR); open(STDERR, ">$logfile");
exec($python, "ajaxterm.py", "--port", $port, "--log");
exit(1);
}