Perl ipc using pipe to intiate the execution of one process from another process -


i want initiate execution of 1 process process in perl such 2 processes run asynchronously parent process should not wait completion of execution of child process.

so using pipe mechanism [ open($fh, '-|', "./child.pl") ] fork new child process child.pl parent process using open function create pipe.

the newly forked child process should continue it's execution till parent process executes.

but issue facing child starts execution when forked using pipe stops writing pipe handles prematurely before parent process finishes it's execution.

so please can me how prevent premature stop of writing pipe handles child process using pipe mechanism mentioned above such child process continues write pipe handles time parent process executes.

you use ipc::open3 this:

 my($wtr, $rdr, $err);  use symbol 'gensym'; $err = gensym;  $pid = open3($wtr, $rdr, $err,'some cmd , args', 'optarg', ...);  ### in main prg  waitpid( $pid, 0 );#when no longer needs child  $child_exit_status = $? >> 8; 

Comments