Bug 58893 - pppd doesn't quit if Ctrl+C entered while executing connect script
Summary: pppd doesn't quit if Ctrl+C entered while executing connect script
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: ppp
Version: 7.2
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Thomas Woerner
QA Contact: Aaron Brown
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-01-26 23:24 UTC by Michael Chapman
Modified: 2007-04-18 16:39 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-08-13 09:19:25 UTC
Embargoed:


Attachments (Terms of Use)
Quit if we receive a SIGINT or SIGTERM while running script (375 bytes, patch)
2002-01-26 23:28 UTC, Michael Chapman
no flags Details | Diff

Description Michael Chapman 2002-01-26 23:24:31 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011226

Description of problem:
I found this problem while setting up ppp and wvdial on a new RedHat 7.2 box
(previously I'd used my own scripts to dial and connect).

If the user sends a SIGINT or a SIGTERM to pppd while it is executing the
connect script (by Ctrl+C for instance), pppd first responds with "Terminating
on signal 2", then it kills the connect script. However, rather than quitting at
this point it continues on and tries to establish the PPP connection. From the
syslog I see that it reports "Serial connection established", "Using interface
ppp0", etc.

Further SIGINTs result in "Terminating on signal 2" messages, but it still
doesn't quit. Sending SIGQUIT (via Ctrl+\), however, works correctly -- pppd
says "Fatal signal 3" and exits.

This bug is most noticable if wvdial is used as the connect script, since wvdial
returns a zero exit code if it is killed with SIGINT even in its "chat mode"
(could this could be a bug too?).

Version-Release number of selected component (if applicable):
ppp-2.4.1-2

How reproducible:
Always

Steps to Reproduce:
As root:

1. /usr/sbin/pppd -detach /dev/ttyS1 115200 noauth connect "/usr/bin/wvdial
--remotename ppp0 --chat MyWvDialSection"
(this is basically what /etc/sysconfig/network-scripts/ifup-ppp ends up doing)
2. Wait for wvDial to start dialling
3. Press Ctrl+C before wvDial exits

Actual Results:

pppd says "Terminating on signal 2", it kills wvdial, and then pppd says:
Serial connection established.
Using interface ppp0
Connect: ppp0 <--> /dev/ttyS1

pppd does not quit, even when sent more SIGINTs or SIGTERMs.

Expected Results:

pppd should say "Terminating on signal 2", then kill wvdial, then exit.

Additional info:

I'll attach a patch to ppp-2.4.1-2 that fixes this bug.

This bug is not apparent through rp3, since if the user cancels rp3 while it is
running /sbin/ifup, rp3 doesn't try to kill ifup. Instead it simply runs
/sbin/ifdown.

/sbin/ifdown (or more correctly, /etc/sysconfig/network-scripts/ifdown-ppp)
tries to kill ppp-watch with a SIGTERM, then a few seconds later it kills
ppp-watch with another SIGTERM. ppp-watch, upon receiving the second SIGTERM,
kills its process group with SIGKILL. So in the end the connection DOES get
cancelled, just not in the quickest way :-)

Comment 1 Michael Chapman 2002-01-26 23:28:40 UTC
Created attachment 43634 [details]
Quit if we receive a SIGINT or SIGTERM while running script

Comment 2 Thomas Woerner 2004-08-13 09:19:25 UTC
Please verify this with a newer version of Red Hat Enterprise Linux or Fedora
Core and reopen it against the new version if it still occurs.

Closing as "not a bug" for now.



Note You need to log in before you can comment on or make changes to this bug.