Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

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

by davido (Cardinal)
on Sep 23, 2012 at 08:02 UTC ( [id://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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2024-04-19 15:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found