in reply to Re: Vague segfault question
in thread open3() problem

kill($sig, -$$);? Don't you mean kill(-$sig, $$);? kill

Replies are listed 'Best First'.
Re^3: Vague segfault question
by ChrisDennis (Sexton) on Feb 04, 2012 at 13:04 UTC

    Thanks for your reply.

    I'm confused now about the use of kill.

    Kill says

    Unlike in the shell, if SIGNAL is negative, it kills process groups instead of processes.

    But perlipc says

    Sending a signal to a negative process ID means that you send the signal to the entire Unix process group.
    Which of those is true?

      Which of those is true?

      Both, they're not mutually exclusive :) if you keep reading it also says

      The behavior of kill when a *PROCESS* number is zero or negative depends on the operating system. For example, on POSIX-conforming systems, zero will signal the current process group and -1 will signal all processes.

      See also what perlport#kill says

        The kill documentation seems to omit what the Camel book adds, that a negative process id (not just -1) will kill all processes in the process group on Posix-conforming systems.