From: James Carlson <carlsonj@workingcode.com>
To: linux-ppp@vger.kernel.org
Subject: Re: Re: about pppd termination?
Date: Wed, 21 May 2008 14:23:53 +0000 [thread overview]
Message-ID: <18484.12409.17430.62838@gargle.gargle.HOWL> (raw)
In-Reply-To: <200805211447103125311@foxmail.com>
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@workingcode.com>
next prev parent reply other threads:[~2008-05-21 14:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-21 6:47 about pppd termination? cyx_mail
2008-05-21 6:56 ` James Cameron
2008-05-21 7:10 ` cyx_mail
2008-05-21 14:23 ` James Carlson [this message]
2008-05-21 23:08 ` James Cameron
2008-05-21 23:14 ` James Carlson
2008-05-22 0:00 ` James Cameron
2008-05-22 0:38 ` James Carlson
2008-05-22 0:38 ` Paul Mackerras
2008-05-22 0:52 ` James Cameron
2008-05-22 0:56 ` James Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=18484.12409.17430.62838@gargle.gargle.HOWL \
--to=carlsonj@workingcode.com \
--cc=linux-ppp@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox