in reply to how to get rid of pressing control+c keys
Otherwise it might be easier to open the pipe(s) with this line;
And move the assignment to the variable $cmd about the open3 call.my $pid = open3(\*IN,\*OUT, 0, "/bin/bash -c $cmd");
This way the eof(OUT) check will return true when the shell completes the task and exits. No ctrl+c needed.
|
---|