Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-26 04:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found