Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
I think some people reading awkmonk's post are missing an important factor... the secondary process is being spawned from a CGI script, which creates problems using the exec and system methods everyone has described already.

exec: "The exec function executes a system command and never returns."
system: "the parent process waits for the child process to complete."

For Win32:
The exec method would cause the script to terminate immediately, which means nothing past the exec() line in the original CGI process would be executed.
The system command would cause the script to hang and wait for the 3 hour process to complete, most likely causing a CGI timeout.

Neither of these are very viable options for awkmonk's problem because it needs to be multi-platform and on Win32 the originating CGI process would never run to completion... it would either exit at exec() or hang for 3 hours at system(), however... the sub-process would be spawned and continue running


In reply to Re: spawning Perl scripts by tekkie
in thread spawning Perl scripts by awkmonk

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 drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2024-04-25 13:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found