Bug 58893 - pppd doesn't quit if Ctrl+C entered while executing connect script
pppd doesn't quit if Ctrl+C entered while executing connect script
Product: Red Hat Linux
Classification: Retired
Component: ppp (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Thomas Woerner
Aaron Brown
Depends On:
  Show dependency treegraph
Reported: 2002-01-26 18:24 EST by Michael Chapman
Modified: 2007-04-18 12:39 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-08-13 05:19:25 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Michael Chapman 2002-01-26 18:24:31 EST
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):

How reproducible:

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 (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 18:28:40 EST
Created attachment 43634 [details]
Quit if we receive a SIGINT or SIGTERM while running script
Comment 2 Thomas Woerner 2004-08-13 05:19:25 EDT
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.