Re: Re: about pppd termination?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



cyx_mail writes:
> 	BTW,why the function "kill_my_pg(sig)" do a system call "kill(0,sig)" with the first parameter "0"? why not to kill himself only but a whole group?

pppd acts as a process group leader, and sending a signal to the
process group means that all children created by pppd (at least those
that haven't gone off to start new process groups) will get the
signal.  This basically cleans up any charshunt or script that might
be running in preparation to exit.

There'd be no point in pppd sending the signal to himself only.  The
whole reason that pppd is doing this at all is that it's about to
exit!  It has already gotten the signal; and talking to yourself is
often not useful.

For more information about the kill(2) system call and process groups,
see your system manual pages, or any reference book on UNIX or POSIX
programming.

-- 
James Carlson         42.703N 71.076W         <carlsonj@xxxxxxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Audio Users]     [Linux for Hams]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Fedora Users]

  Powered by Linux