From d518ac6dcbf7c2ec4fb7c01ae0615d6cef5dc86b Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Wed, 3 Feb 2010 18:10:26 -0800 Subject: [PATCH] Log ajaxterm output --- ajaxterm/index.cgi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ajaxterm/index.cgi b/ajaxterm/index.cgi index 2ba1019a7..45a0ef9d0 100755 --- a/ajaxterm/index.cgi +++ b/ajaxterm/index.cgi @@ -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(*STDERR); open(STDERR, ">/dev/null"); + untie(*STDOUT); open(STDOUT, ">$logfile"); + untie(*STDERR); open(STDERR, ">$logfile"); exec($python, "ajaxterm.py", "--port", $port, "--log"); exit(1); }