[Bug 634] New: init scripts which run programs of the same name fail on restart

blfs-bugs at linuxfromscratch.org blfs-bugs at linuxfromscratch.org
Wed Mar 3 06:56:36 PST 2004


           Summary: init scripts which run programs of the same name fail on
           Product: Beyond LinuxFromScratch
           Version: 5.0
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: trivial
          Priority: P4
         Component: BOOK
        AssignedTo: blfs-book at linuxfromscratch.org
        ReportedBy: ryanr at uchicago.edu
         QAContact: blfs-book at linuxfromscratch.org

As the subject says.  The problem is that loadproc calls getpids, which checks
for any scripts or other processes of the name which you are trying to call, and
if the script has that name (i.e. sshd, which is still in the BLFS book), then
it finds the script and thinks it's an instance of the process, and thus prints
out "Already running [ ATTN ]" without starting the program.

Strangely, this only happens on restart; it works fine at boot, but if I stop
and then start the program, even in two separate stages rather than calling the
script with 'restart' as an argument, it does what I've described.  Removing the
-x from the call to pidof in getpids fixes this, and if I put in a debug line
that prints out pidlist, in those instances that it fails it prints a different
pid each time the script is run, even if I'm only trying to start the program,
which suggests to me that it's finding the script itself.  Why it doesn't do
this at boot, I don't know.

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
You are the QA contact for the bug, or are watching the QA contact.

More information about the blfs-book mailing list