I have an external process that I want no control over once it's started running. Looking at exec() it sounds like the parent process actual exits once it's started exec(), is this true?
My problem lies in the fact that I have a web application that awaits a return value before loading a new page. The return value in itself is meaningless, but because it's XML-RPC, a return nevertheless is requested, especially as I'd like to see if the XML-RPC is working.
Thus I have this sub-function using a SOAP::Lite XML-RPC daemon:
Thankssub go{ shift if UNIVERSAL::isa($_[0] => __PACKAGE__); FORK: { if ($child = fork) { }elsif (defined $child) { my $exec = "/usr/local/bin/monster -i$id $filePath$file &"; qx/$exec/; }elsif ($! == EAGAIN) { sleep 5; redo FORK; }else { die "Can't fork: $!\n"; } } return 0; #just to say 'done'. }
Sam Seaver
In reply to Running external process WHILE exiting/returning by seaver
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |