Hi, just a little search at search.cpan.org helps
http://cpan.uwinnipeg.ca/module/Proc::Background::Win32 Best regards Manfred Beilfuss "Jutu Subramanian, Srinivasan (Cognizant)" An: "Roger Keane" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> Gesendet von: Kopie: [EMAIL PROTECTED] Thema: RE: fork didn't work eState.com 03.11.2004 08:24 Hi, Thanks for your information. Can I have sample code and where to get the ppd to install the Proc::background perl modules If you know, Kindly tell me. regards Srinivas -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Roger Keane Sent: Tuesday, November 02, 2004 9:08 PM To: [EMAIL PROTECTED] Subject: Re: fork didn't work Jutu Subramanian, Srinivasan (Cognizant) wrote: > > Hi, > I need to execute a perl application from one perl application. > I should do with fork and exec. The execution of another one perl application is the independent > to the parent process.So, I don't want to use wind32::CreateProcess. Using fork() in Perl on Windows means using threads. If you are creating another process anyway, use system() or Proc::Background. You should create new background processes with fork() on Unix platforms. You should create new background processes with Win32::CreateProcess() on Windows platforms. Proc::Background does that for you. > If I use the fork and exec, Need to do the process of Reaping dead children. Proc::Background is able to reap finished child process. Proc::Background is able to return the status of the finished child process. Proc::Background is able to wait for child process to finish. Proc::Background is able to kill the child process. Proc::Background is able to check that the child process is still alive. > > This method is also wait for the forked process to complete its work. So, the next parent > process continues only after the child process exits. > It overcomes the fork limitation of compiled in limit of 64 active threads. > > The output for the sample code is given below. > PARENT PROCESS=1 > filter.pl called with parameter 1 > PARENT PROCESS=2 > filter.pl called with parameter 2 > PARENT PROCESS=3 > filter.pl called with parameter 3 > > Actually, Firt perl program(parent) is not to wait for the another perl program(child) completes. > Parent process keeps on running 24 hours. So, Child process getting accumulated in the process table. > If we harvesting the dead children by the method of Reaping dead children, We would be getting the > result as mentioned above. It is similar to the usage of wait at the parent process. Is it comfortable > to use the reaping dead children. Kindly advice me on this and revert back for any clarifications. Proc::Background allows you to create and manage multiple background processes concurrently. If you do not need to manage multiple background processes concurrently, use system(). If you only need to manage multiple background processes concurrently on Windows and want to learn more about the Win32 API use Win32::CreateProcess. If you need your code to run on both Unix and Win32 systems, use Proc::Background. If you do not want to learn about the Win32 API, or want a simpler API than Win32::CreateProcess, use Proc::Background. > regards > Srinivas > hope that helps, rgr _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly prohibited and may be unlawful. Visit us at http://www.cognizant.com _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs