Linux PPP protocol development
 help / color / mirror / Atom feed
From: James Cameron <james.cameron@hp.com>
To: linux-ppp@vger.kernel.org
Subject: Re: why kill pppd but pppoe-server die?
Date: Thu, 22 May 2008 03:18:42 +0000	[thread overview]
Message-ID: <20080522031842.GP6559@hp.com> (raw)
In-Reply-To: <200805221054295315414@foxmail.com>

On Thu, May 22, 2008 at 10:54:30AM +0800, cyx_mail wrote:
> (1) when a pppoe connections established, pppoe-server spawns a child
> process "pppd".

Okay.

> I modified the pppoe-server code a little, and let pppoe-server send
> SIGTERM to the child process.

Okay.  If pppd has not detached, then the SIGTERM will also be delivered
to your pppoe-server process.  You must handle this signal.

> pppoe-server die not the child pppd die.

Your observation matches.

> (2) But if I use command "kill pppd pid" in SHELL to kill the child
> pppd, the result pppd die is what I expected.
> 	why?

I don't know.  This is a question about pppoe-server and your current
source code.  Are SIGINT and SIGTERM handled differently by pppoe-server
at different times?  What version of pppoe-server source are you using?
I've just looked at rp-pppoe-3.8/src/pppoe-server.c and the signals are
both handled by exiting, in termHandler().

-- 
James Cameron                         http://quozl.netrek.org/
HP Open Source, Volunteer             http://opensource.hp.com/
PPTP Client Project, Release Engineer http://pptpclient.sourceforge.net/

      reply	other threads:[~2008-05-22  3:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-22  2:54 why kill pppd but pppoe-server die? cyx_mail
2008-05-22  3:18 ` James Cameron [this message]

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=20080522031842.GP6559@hp.com \
    --to=james.cameron@hp.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