| Store | Cart

RE: untethered child process

From: John DePasquale <joh...@johndepasquale.net>
Tue, 2 Aug 2016 14:02:57 -0400
Thanks howard. I did try that option, as below:

 

Win32::Process::Create( $Win32processObj,

                        'e:\\programs\\dev\\batfile.bat',

                        'batfile.bat',

                         0,

                         DETACHED_PROCESS,

                         '.' ) ||  die "Failed to create process.\n";

 

Interestingly, this did not run the bat file at all ( though it did not
produce the "Failed . . . " error ). This same statement runs fine when I
use NORMAL_PRIORITY_CLASS in place of DETACHED_PROCESS, meaning that it runs
the bat file successfully. However, the parent process waits for the
win32::process to complete before control is returned to the parent. Using
DETACHED_PROCESS not only does not achieve the objective, it causes the
child process to not run at all, for some reason.

 

John DePasquale

Chief Executive Officer

Paradigm Consulting

"Proudly presenting the Vinopedia System"

www.vinopedia.us <http://www.vinopedia.us/> 

49 Dalby Street

Newton, MA  02458

Mobile: 617-610-2424

Fax: 617-600-7326

  _____  

 

From: Howard Tanner [mailto:tan...@optonline.net] 
Sent: Tuesday, August 02, 2016 1:51 PM
To: 'John DePasquale'
Subject: RE: untethered child process

 

Did you use the DETACHED_PROCESS option on the Win32::Process->Create? This
should in theory do what you want.

 

From: acti...@listserv.ActiveState.com
[mailto:acti...@listserv.ActiveState.com] On Behalf Of John
DePasquale
Sent: Tuesday, August 2, 2016 12:52 PM
To: acti...@listserv.ActiveState.com
Subject: untethered child process

 

Hi all,

Is it truly possible to spawn a child process in perl on windows so that the
parent process does NOT wait for the child process to finish before the
parent continues its own processing? I've tried to accomplish this over the
last couple of days using exec, system, wind32::process, proc::background,
fork, and more, on windows server 2008 using perl 5.22.1. For each of these
statements I'm able to spawn a child process that runs a .bat file
successfully, but in each case the parent waits for the .bat file to finish
processing ( it takes about 40 seconds ) before the parent proceeds. I'm
beginning to think that this is not really possible on windows. I have found
dozens of sites that detail usage of each of these statements and I've tried
them all. I can get all of them to launch and complete a child process but I
can't get the parent to NOT wait for completion.

Any guidance is very gratefully appreciated. Thank you.

-          john

 

John DePasquale

Chief Executive Officer

Paradigm Consulting

"Proudly presenting the Vinopedia System"

www.vinopedia.us <http://www.vinopedia.us/> 

49 Dalby Street

Newton, MA  02458

Mobile: 617-610-2424

Fax: 617-600-7326

  _____  

 


_______________________________________________
ActivePerl mailing list
Acti...@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Recent Messages in this Thread
John DePasquale Aug 02, 2016 04:52 pm
Andy Grundman Aug 02, 2016 08:47 pm
Francisco Zarabozo Aug 02, 2016 09:28 pm
John DePasquale Aug 02, 2016 06:02 pm
Kenneth Ă–lwing Aug 02, 2016 07:15 pm
Messages in this thread