Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Perl / Apache 2 / Alarmsby DanielSpaniel (Scribe) |
on Dec 28, 2011 at 21:22 UTC ( [id://945420]=perlquestion: print w/replies, xml ) | Need Help?? |
DanielSpaniel has asked for the wisdom of the Perl Monks concerning the following question: Versions: Perl 5.10, Apache 2.x, CentOS 6 (modified since originally posted, so that process A kicks off the scripts, rather than using an intermediary script to do it)I have a Perl script (process A) which kicks off several other Perl scripts. Process A is kicked off via http. I am trying to get process A to wait for x seconds after having executed the other scripts, which may have finished, or they may not have done; I don’t really care – I just need to wait x seconds in process A, and then continue. I’ve tried several ways of doing this, but can’t seem to get it working as I want. Partly this is probably because I don’t really understand signals etc, etc properly. I used to have a way of making it work in Apache 1.3, but Apache 2.x has changed how it handles such things I think. So, code which I can get to work as a single process (purloined from StackOverflow), as a test, is below:
This does as expected, and exits after five seconds. However, I’m not sure if it’s because I am not implementing the code properly, but I just can’t seem to get it working, and I can get no http output until each of the kicked-off scripts has finished. The relevant snippet of my code from process A looks like this:
Any assistance would be greatly appreciated! Thanks.
Back to
Seekers of Perl Wisdom
|
|