Bug 10511 - a second ppp-watch started by ifup ppp0 will delete /var/run/pppwatch-ppp0.pid preventing user from bringing interface down
a second ppp-watch started by ifup ppp0 will delete /var/run/pppwatch-ppp0.pi...
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
: FutureFeature
Depends On:
  Show dependency treegraph
Reported: 2000-04-01 18:48 EST by casey
Modified: 2014-03-16 22:13 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-04-03 17:27:57 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description casey 2000-04-01 18:48:28 EST
while using rp3 graphical ppp interface controller.
(and hence ifup/ifdown)
left click on rp3, window pops ups, bring up interface ppp0? yes or no
click yes
blah, blah, blah it dials and connects, ppp0 is brought up.

if the interface is brought down unnaturally(the other end disconnects,
phone line is unplugged...) and the interface is configured to reconnect,
then it will enter a loop trying to reconnect.

now the problem:

if, while in this loop, you click on rp3, it will pop open a window asking
you whether you want to bring up interface ppp0. if you click yes, then i
deduce that a new ppp-watch is spawned which creates the file
/var/run/pppwatch-ppp0.pid with its own pid and tries to bring up the
interface, which fails since the modem is locked, it then exits removing

the old ppp-watch is still in its loop trying to bring up ppp0, but any
attempt to bring the interface up or down will fail since the file
/var/run/pppwatch-ppp0.pid is gone.

ppp-watch should check to see if /var/run/pppwatch-ppp0.pid exists
and then if the pid is valid, or whatever action you decide is right,
you're the experts. :)

Comment 1 Bill Nottingham 2000-04-03 11:53:59 EDT
Hmm... that behavior is exactly what it's currently programmed to do.
from the source:

    if (pidFileName) {
        /* remove it */
        pidFilePath = alloca(strlen(pidFileName) + 25);
        sprintf(pidFilePath, "/var/run/pppwatch-%s.pid", pidFileName);
        unlink(pidFilePath); /* not much we can do in case of error... */

We'll look into fixing this.
Comment 2 Bill Nottingham 2000-04-03 17:27:59 EDT
Aha, fixed in 5.06-1. Thanks for the patch.

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