Bug 10511

Summary: a second ppp-watch started by ifup ppp0 will delete /var/run/pppwatch-ppp0.pid preventing user from bringing interface down
Product: [Retired] Red Hat Linux Reporter: casey
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1CC: rvokal
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
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: --- Target Upstream Version:
Embargoed:

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.