Skip to contentSkip to conversation

why kill pppd but pppoe-server die?

DISCUSSION cyx_mail 2 participants 2 messages May 22, 2008 PPP protocol drivers and compressors

lore
Share & tools
lore

cyx_mail

author
#0 lore raw

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?

#1 lore raw
Quoted 2 lines · cyx_mail

(1) when a pppoe connections established, pppoe-server spawns a child process "pppd".

Okay.

Quoted 2 lines

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.

Quoted 1 line

pppoe-server die not the child pppd die.

Your observation matches.

Quoted 3 lines

(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().

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