Hi All
I am running a cgi script which calls another perl script which takes long time to run.I am running this time consuming script in the background. Now the problem is the cgi scripts keeps on running in the browser till the background script runs. I want to kill this parent cgi script and let the background script running
#!/usr/bin/perl -w use CGI; use strict; my $query = new CGI; my $DirName =$query->param("dir"); my $maxSeqLen=$query->param("maxSeqLen"); my $minSeqLen=$query->param("minSeqLen"); my $WindowSize=$query->param("WindowSize"); my $Email=$query->param("email"); print $query->header(); my $cmd=" /var/www/cgi-bin/nuScore/ProcessLongData.pl $DirName $maxSeq +Len $minSeqLen $WindowSize $Email &"; system($cmd); print "<html>\n"; print "<head>\n"; print "<title>nuScore</title>\n"; print "<body>\n"; print "<table width='641' border='0' cellspacing='0' cellpadding='0' a +lign='left'>\n"; print "<tr> <td>Thank you for submiting your email address. Sequences +will be processed and the link to results page will be sent by email. +<br>< </td> </tr>\n"; print "<hr></table></body></html>\n";

In reply to How can I kill pid of parent and keep that of child alive by advait

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.