Bug 10511 - a second ppp-watch started by ifup ppp0 will delete /var/run/pppwatch-ppp0.pid preventing user from bringing interface down
Summary: a second ppp-watch started by ifup ppp0 will delete /var/run/pppwatch-ppp0.pi...
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: initscripts   
(Show other bugs)
Version: 6.1
Hardware: All Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact:
URL:
Whiteboard:
Keywords: FutureFeature
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-04-01 23:48 UTC by casey
Modified: 2014-03-17 02:13 UTC (History)
1 user (show)

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


Attachments (Terms of Use)

Description casey 2000-04-01 23:48:28 UTC
while using rp3 graphical ppp interface controller.
(and hence ifup/ifdown)
scenario:
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
/var/run/pppwatch-ppp0.pid.

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. :)

-brandon

Comment 1 Bill Nottingham 2000-04-03 15:53:59 UTC
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 21:27:59 UTC
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.