Dear Monks,

I've got a simple CGI web form that gathers some input from the user, runs a perl script that takes 2-3 minutes to complete, and then displays the results. During the 2-3 minutes that the program is running, I'd like to display an "in-progress" page that will periodically self-refresh and give the user messages about its status. This seems like it should be straightforward, but I can't seem to figure out how to do it.

I realize this is similar to the issue addressed here: Managing a long running server side process using CGI, but my code is running on Apache 2.2.15 (Red Hat), not on windows. I'm not sure how to properly initiate a child process on this server. I tried using  fork(), but it doesn't seem to work (as far as I can tell, the child process never gets executed). Google pointed me to some rather vague references to a module called Apache2::SubProcess, but it's not clear to me (even after reading the CPAN documentation for that module) how this is supposed to work.

Thanks for any suggestions!


In reply to Update on controlling long-running processes via CGI by dannyhmg

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.