diff options
author | TheTroll <trolldev@gmail.com> | 2010-02-27 04:05:46 +0100 |
---|---|---|
committer | TheTroll <trolldev@gmail.com> | 2010-02-27 04:05:46 +0100 |
commit | a939300bae092bcd836dc11537b3efa005634c25 (patch) | |
tree | c1053f58a54932723b83c1d0aaab40733d9038b5 | |
parent | 49c824834d10639ec90d8c53d76e4c5e2d84c860 (diff) | |
download | istreamdev-a939300bae092bcd836dc11537b3efa005634c25.tar.gz istreamdev-a939300bae092bcd836dc11537b3efa005634c25.tar.bz2 |
Simplified segmenter pid kill
-rwxr-xr-x | includes/inc_session.php | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/includes/inc_session.php b/includes/inc_session.php index 6630107..6bee609 100755 --- a/includes/inc_session.php +++ b/includes/inc_session.php @@ -52,21 +52,12 @@ function sessioncreate($type, $name, $title, $desc, $qname, $qparams, $category, function sessiondelete($session) { $ram = "ram/" .$session ."/"; - $subcmd = ""; // Get segmenter PID if any if (file_exists($ram ."segmenter.pid")) - { - $pidfile = fopen($ram ."segmenter.pid", 'r'); - if ($pidfile) - { - $pid = fgets($pidfile); - $subcmd = "kill " .$pid ." ; "; - fclose($pidfile); - } - } + $cmd = "kill `cat " .$ram ."segmenter.pid`; rm " .$ram ."segmenter.pid; "; - $cmd= $subcmd ."rm -rf " .$ram; + $cmd .= "rm -rf " .$ram; exec ($cmd); } |