CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
process still executing after exit

 



lord_hairball
stranger

Mar 2, 2001, 1:13 PM

Post #1 of 1 (162 views)
process still executing after exit Can't Post

the process 'tail' is still executing after the script exits. any ideas on how to stop it?

script is coded as follows:

#!/usr/contrib/bin/perl -w
#tailsyslog.cgi
$|=1;

$SIG{ALRM} = "timed_out";

alarm 120;

print "Content-type: text/plain\n\n";

open (IX,'tail -f /var/adm/syslog/syslog.log |');
while (<IX>)
{
chop $_;
print "$_\n";
}
close (IX);

###################functions#####################

sub timed_out
{
print "Operation has timed out. You will need to start a new session.\n";
close (IX);
exit;
}


 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives