detach .exe from perl main script -


i stuck here..:( trying execute temp.exe file perl script.

i tried using following:

1)

         $pid=  open( cmd, "| exp.exe  > c:\exp_out.txt" );          print cmd "arg1\n";          print cmd "arg2\n";          print cmd "arg3\n"; 

now exp.exe keeps running in background without problem. if want close , start again starts exp.exe not provide input arguments exp.exe

closing:

         system("taskkill /f /t /pid $pid");`  

now part of 2 sub routines open , close...

i tried open2;win32::process; open2 stuck @ exp.exe , win32::process dont know how pass multiple arguments.

try passing arguments in command line. printing cmd typing text after open pipe. if want, program exp.exe needs expect input stdin

$pid = open(cmd, "| exp.exe arg1 arg2 arg3 > file.txt"); #do work here close(cmd) 

Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -