in reply to Re: Run Perl script in perl program with new process group
in thread Run Perl script in perl program with new process group

Thanks for All who have helped me in here. Everything is working now as expected. Was using system() instead of exec and there was some confusion created due to lot of debug print statements. After removing all print statements it is working now as expected. $cmd = qq{nohup ./perl.pl}; my $pid = fork; if ($pid) { } else{ # Must do setpgrp as child for nohup and job control stuff... setpgrp || die "Cannot do SetGroup\n"; exec "$cmd" || die "Bad exec $!"; }
  • Comment on Re^2: Run Perl script in perl program with new process group