All of lore.kernel.org
 help / color / mirror / Atom feed
* issue about PIDs ?
@ 2008-05-21 13:31 cyx_mail
  2008-05-21 23:12 ` James Cameron
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: cyx_mail @ 2008-05-21 13:31 UTC (permalink / raw)
  To: linux-ppp

Hi,all!                                     

	I got some kill PID issue. I think the data struct "ClientSessionStruct" connecting pppoe-server process and pppd process. So , when the server get a PADT, it can kill the child pppd process by according to the ClientSessionStruct's member pid.
	my problem:
	I modified the pppoe-server code ,and let pppoe-server spawn a pppd. then let the server send SIGTEM to pppd(using kill(pppd 2's pid , SIGTEM)) not using the normal way(such as stopsession as the code written). the pppoe-server and pppd die both, why?

	

2008-05-21 




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

* Re: issue about PIDs ?
  2008-05-21 13:31 issue about PIDs ? cyx_mail
@ 2008-05-21 23:12 ` James Cameron
  2008-05-22  1:27 ` cyx_mail
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: James Cameron @ 2008-05-21 23:12 UTC (permalink / raw)
  To: linux-ppp

On Wed, May 21, 2008 at 09:31:20PM +0800, cyx_mail wrote:
> I modified the pppoe-server code ,and let pppoe-server spawn a pppd.
> then let the server send SIGTEM to pppd(using kill(pppd 2's pid ,
> SIGTEM)) not using the normal way(such as stopsession as the code
> written). the pppoe-server and pppd die both, why?

I guess you mean SIGTERM.  This matches my observation with pptpconfig.
Workaround is to define a handler or ignore the SIGTERM signal in your
pppoe-server code.

NetworkManager-pptp also specifically handles SIGTERM and SIGINT,
presumably for the same reason.

-- 
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] 6+ messages in thread

* Re: Re: issue about PIDs ?
  2008-05-21 13:31 issue about PIDs ? cyx_mail
  2008-05-21 23:12 ` James Cameron
@ 2008-05-22  1:27 ` cyx_mail
  2008-05-22  1:29 ` James Cameron
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: cyx_mail @ 2008-05-22  1:27 UTC (permalink / raw)
  To: linux-ppp

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="windows-1254", Size: 1516 bytes --]

 
> Workaround is to define a handler or ignore the SIGTERM signal in your pppoe-server code.

you mean define a handler in pppd code? what function should call in the handler to bring the pppd down gracefully?

2008-05-22 

·¢¼þÈË£º James Cameron 
·¢ËÍʱ¼ä£º 2008-05-22  07:11:51 
ÊÕ¼þÈË£º cyx_mail 
³­ËÍ£º linux-ppp 
Ö÷Ì⣺ Re: issue about PIDs ? 
On Wed, May 21, 2008 at 09:31:20PM +0800, cyx_mail wrote:
> I modified the pppoe-server code ,and let pppoe-server spawn a pppd.
> then let the server send SIGTEM to pppd(using kill(pppd 2's pid ,
> SIGTEM)) not using the normal way(such as stopsession as the code
> written). the pppoe-server and pppd die both, why?
I guess you mean SIGTERM.  This matches my observation with pptpconfig.
Workaround is to define a handler or ignore the SIGTERM signal in your
pppoe-server code.
NetworkManager-pptp also specifically handles SIGTERM and SIGINT,
presumably for the same reason.
-- 
James Cameron                         http://quozl.netrek.org/
HP Open Source, Volunteer             http://opensource.hp.com/
PPTP Client Project, Release Engineer http://pptpclient.sourceforge.net/
--
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
the body of a message to majordomo@vger.kernel.org
__________ NOD32 3090 (20080509) Information __________
This message was checked by NOD32 antivirus system.
http://www.nod32cn.com
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þšiþ)í…æèw*\x1fjg¬±¨\x1e¶‰šŽŠÝ¢jÿ¾\a«þG«éÿ¢¸\f¢·¦j:+v‰¨ŠwèjØm¶Ÿÿþø\x1e¯ù\x1e®w¥þŠàþf£¢·hšâúÿ†Ù¥

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

* Re: Re: issue about PIDs ?
  2008-05-21 13:31 issue about PIDs ? cyx_mail
  2008-05-21 23:12 ` James Cameron
  2008-05-22  1:27 ` cyx_mail
@ 2008-05-22  1:29 ` James Cameron
  2008-05-22  1:37 ` cyx_mail
  2008-05-22  2:37 ` James Cameron
  4 siblings, 0 replies; 6+ messages in thread
From: James Cameron @ 2008-05-22  1:29 UTC (permalink / raw)
  To: linux-ppp

On Thu, May 22, 2008 at 09:23:06AM +0800, cyx_mail wrote:
> you mean define a handler in pppd code?

No, in your pppoe-server code.  Handle the SIGINT as if it is expected
side-effect.

> what function should call in the handler to bring the pppd down
> gracefully?

Sorry, I don't understand this question.

-- 
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] 6+ messages in thread

* Re: Re: Re: issue about PIDs ?
  2008-05-21 13:31 issue about PIDs ? cyx_mail
                   ` (2 preceding siblings ...)
  2008-05-22  1:29 ` James Cameron
@ 2008-05-22  1:37 ` cyx_mail
  2008-05-22  2:37 ` James Cameron
  4 siblings, 0 replies; 6+ messages in thread
From: cyx_mail @ 2008-05-22  1:37 UTC (permalink / raw)
  To: linux-ppp

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="windows-1254", Size: 1704 bytes --]

> you mean define a handler in pppd code?

>No, in your pppoe-server code.  Handle the SIGINT as if it is expected
>side-effect.

so if I define a handler in pppd ,and kill pppd himself in the handler ? can solve this problem?


> what function should call in the handler to bring the pppd down
> gracefully?

>Sorry, I don't understand this question.
if I want to kill pppd himself in the handler that user defined in pppd, what function should I call to kill pppd himself safely?


------------------				 
cyx
2008-05-22

-------------------------------------------------------------
·¢¼þÈË£ºJames Cameron
·¢ËÍÈÕÆÚ£º2008-05-22 09:26:52
ÊÕ¼þÈË£ºcyx_mail
³­ËÍ£ºlinux-ppp@vger.kernel.org; James Cameron
Ö÷Ì⣺Re: Re: issue about PIDs ?

On Thu, May 22, 2008 at 09:23:06AM +0800, cyx_mail wrote:
> you mean define a handler in pppd code?

No, in your pppoe-server code.  Handle the SIGINT as if it is expected
side-effect.

> what function should call in the handler to bring the pppd down
> gracefully?

Sorry, I don't understand this question.

-- 
James Cameron                         http://quozl.netrek.org/
HP Open Source, Volunteer             http://opensource.hp.com/
PPTP Client Project, Release Engineer http://pptpclient.sourceforge.net/
--
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

__________ NOD32 3090 (20080509) Information __________

This message was checked by NOD32 antivirus system.
http://www.nod32cn.com


ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þšiþ)í…æèw*\x1fjg¬±¨\x1e¶‰šŽŠÝ¢jÿ¾\a«þG«éÿ¢¸\f¢·¦j:+v‰¨ŠwèjØm¶Ÿÿþø\x1e¯ù\x1e®w¥þŠàþf£¢·hšâúÿ†Ù¥

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

* Re: Re: Re: issue about PIDs ?
  2008-05-21 13:31 issue about PIDs ? cyx_mail
                   ` (3 preceding siblings ...)
  2008-05-22  1:37 ` cyx_mail
@ 2008-05-22  2:37 ` James Cameron
  4 siblings, 0 replies; 6+ messages in thread
From: James Cameron @ 2008-05-22  2:37 UTC (permalink / raw)
  To: linux-ppp

On Thu, May 22, 2008 at 09:37:29AM +0800, cyx_mail wrote:
> so if I define a handler in pppd ,and kill pppd himself in the
> handler?

No, I said define a handler for SIGINT in the other program in the
process group that you don't want terminated.  Perhaps you'd like to
have another try at defining the problem?

> if I want to kill pppd himself in the handler that user defined in
> pppd, what function should I call to kill pppd himself safely?

I wasn't suggesting adding a handler to pppd, so I don't need to answer
this question.

-- 
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] 6+ messages in thread

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

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-21 13:31 issue about PIDs ? cyx_mail
2008-05-21 23:12 ` James Cameron
2008-05-22  1:27 ` cyx_mail
2008-05-22  1:29 ` James Cameron
2008-05-22  1:37 ` cyx_mail
2008-05-22  2:37 ` 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.