in reply to Re^2: Allowing user to abort waitpid
in thread Allowing user to abort waitpid

Moving the child to its own process group (setpgrp(0,0)) would also avoid getting the INT signal when the user presses a Control-c.

Replies are listed 'Best First'.
Re^4: Allowing user to abort waitpid
by Anonymous Monk on Mar 07, 2016 at 10:07 UTC
    Sure, there is a number of ways to do it. setpgrp is not in (Perl's) POSIX, but it has setpgid. Doing that will have other consequences wrt SIGQUIT, SIGHUP etc. Probably not a problem in practice, though.

    Come to think of it, system might also be close to what the OP is trying to do...

      setpgrp is not in (Perl's) POSIX
      Hah, I forgot those built-in Perl's Unix functions :)