Alex Read wrote: > I have an html page that when I press the submit button the cgi script > runs a shell script. I am having trouble because the html page hangs > until the shell script has finished, i.e. the shell script process is > not running in the background. I have tried the following; > > system "$my_shell_script &"; > `$my_shell_script &`; > exec "$my_shell_script "; > exec "$my_shell_script &"; > > none of which work! The basis of my script is Formmail from Matt's > script archive (http://www.worldwidemart.com/scripts/) if anyone knows > it. > Any suggestions?
gaa! don't use the scripts from worldwidemart.com. you can find drop-in replacements for most all of his code (and the reasons not to use it) at http://nms-cgi.sourceforge.net/ as for your problem with perl having to wait for your shell commands, if you're not running mod_perl, use fork() to execute the commands, which will enable your .cgi to continue forward without waiting. for more information about fork: perldoc -f fork -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
