timeout problem

Discussion in 'Perl Misc' started by shurikgefter@gmail.com, Feb 13, 2007.

  1. Guest

    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
     
    , Feb 13, 2007
    #1
    1. Advertising

  2. J. Gleixner Guest

    wrote:
    > 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
     
    J. Gleixner, Feb 13, 2007
    #2
    1. Advertising

  3. Guest

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


    ## 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

    --
    -------------------- http://NewsReader.Com/ --------------------
    Usenet Newsgroup Service $9.95/Month 30GB
     
    , Feb 13, 2007
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bob Johnson
    Replies:
    0
    Views:
    3,782
    Bob Johnson
    Aug 7, 2003
  2. Do
    Replies:
    2
    Views:
    6,387
  3. Guoqi Zheng
    Replies:
    4
    Views:
    13,051
    Guoqi Zheng
    Jun 3, 2004
  4. Just D

    IIS timeout, IE timeout or what?

    Just D, Jun 21, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    3,536
    Just D
    Jun 21, 2004
  5. Mark Probert

    Timeout::timeout and Socket timeout

    Mark Probert, Oct 6, 2004, in forum: Ruby
    Replies:
    1
    Views:
    1,298
    Brian Candler
    Oct 6, 2004
Loading...

Share This Page