|Do you know where your variables are?|
CGI - run script without waitingby Yaerox (Scribe)
|on Apr 15, 2014 at 10:51 UTC||Need Help??|
Yaerox has asked for the wisdom of the Perl Monks concerning the following question:
Hey guys, I'm facing a little problem with Perl and CGI. I got a homepage with a button, on-click I'm submitting the form values and running a perl script. In this perl script I need to run a system command without waiting for the end of the command!
Create an Example.bat:
Now I tried to get this done on an XAMPP webserver. When I'm clicking my button I start the first perl script which is doing a system("start perl -w just_another_perl_script.pl") and printing the complete html-site. But my browser symbol which shows if a page is loading, and this "Inspect Element > Network" in Google Chrome Browsers is showing that the site is still loading.
The site shown when I started the script is just a html-link and i can click it and I'm able to get back while the scripts are still running ... but when I try to use those meta-tags to redirect isntantly to another page after pressing a button the site waits till the scripts finished like the status-symbol in browser is doing.
Ofc I did some research to find out what the problem is, and I read pretty often that I should use modules like Proc::Daemon, but If I don't have to fork/build own processes, I don't want it! Threads I looked up (just a few examples):
But this Proc::Daemon Tool can't be used on windows ...
Can someone tell me maybe how to fix my problem in case there is a chance to fix it, otherway if I have to use such modules like Proc::Daemon why Webservers (the Apache) is working like this? I mean if I have to go such a way, I want to know why I have to ...