Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
Syntactic Confectionery Delight
 
PerlMonks  

Re: Need to call 3rd party program and continue execution

by davido (Archbishop)
on Sep 23, 2012 at 08:02 UTC ( #995184=note: print w/ replies, xml ) Need Help??


in reply to Need to call 3rd party program and continue execution

On Windows, you might try:

system 1, $command_which_will_not_block;

In a *nix environment, you could try:

system "$command_which_will_not_block &";

See also: perlipc#Complete Disassociation of Child from Parent, which for a Windows user is going to lead you to Win32::Process

The end result, if you go the Win32::Process route might look something like this:

use Win32::Process; my $curdir = 'C:/whatever'; my $appname = 'whatever.exe'; my $command_line = 'who_knows'; my $p_obj; Win32::Process::Create( $p_obj, $appname, $command_line, 0, CREATE_NEW_CONSOLE | DETACHED_PROCESS | NORMAL_PRIORITY_CLASS, $curdir ) or die "Couldn't spawn the process.\n";

...though I'm not certain on the choice of flags.


Dave


Comment on Re: Need to call 3rd party program and continue execution
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://995184]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2014-04-20 13:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (485 votes), past polls