timeout problem

S

shurikgefter

Hi,

I run the following script in apache.
-----------------------------------------------------------------------
#!/usr/local/bin/perl
print "Content-type:text/html\n\n";
print "<html><body>";

`/tmp/bin/unpack.pl `;
$comm_status = $?;

if( $comm_status eq "0" ) {
print "Done";
} else {
print "Error";
}

print "</body></html>";
-----------------------------------------------------------------------

the unpack.pl run ~10 minutes ( the default timeout is 5 minute ) and
when its finished I dont get the script output ( Done or Error ).
How I can solve it without change the default definition of timeout in
httpd.conf.

Thanks
 
J

J. Gleixner

Hi,

I run the following script in apache.
-----------------------------------------------------------------------
#!/usr/local/bin/perl
print "Content-type:text/html\n\n";
print "<html><body>";

`/tmp/bin/unpack.pl `;
$comm_status = $?;

if( $comm_status eq "0" ) {
print "Done";
} else {
print "Error";
}

print "</body></html>";
-----------------------------------------------------------------------

the unpack.pl run ~10 minutes ( the default timeout is 5 minute ) and
when its finished I dont get the script output ( Done or Error ).
How I can solve it without change the default definition of timeout in
httpd.conf.

http://www.stonehenge.com/merlyn/WebTechniques/col20.html
 
X

xhoster

Hi,

I run the following script in apache.

## This might interfere with the system commands, but
## in my hands it doesn't.
## Also, this placates my server's (and browser's) timeout, but your server
## may vary.

$SIG{ALRM}=sub {print ".\n"; alarm 10};
alarm 10;
`/tmp/bin/unpack.pl `;

#Why use backticks if you aren't doing anything with the results?

alarm 0;
print "<hr>";

....


Xho
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top