All of lore.kernel.org
 help / color / mirror / Atom feed
* why kill pppd but pppoe-server die?
@ 2008-05-22  2:54 cyx_mail
  2008-05-22  3:18 ` James Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: cyx_mail @ 2008-05-22  2:54 UTC (permalink / raw)
  To: linux-ppp

Hi,all:

	(1)when a pppoe connections established ,pppoe-server spwans a child process "pppd". I modified the pppoe-server code a little, and let pppoe-server send SIGTERM to the child process. pppe-server die not the child pppd die.

	(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?



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: why kill pppd but pppoe-server die?
  2008-05-22  2:54 why kill pppd but pppoe-server die? cyx_mail
@ 2008-05-22  3:18 ` James Cameron
  0 siblings, 0 replies; 2+ messages in thread
From: James Cameron @ 2008-05-22  3:18 UTC (permalink / raw)
  To: linux-ppp

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/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-05-22  3:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-22  2:54 why kill pppd but pppoe-server die? cyx_mail
2008-05-22  3:18 ` James Cameron

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.