* 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