Bug 524359 - PATCH: don't sleep and do killall5 -9 if not needed
Summary: PATCH: don't sleep and do killall5 -9 if not needed
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-09-19 12:17 UTC by Hans de Goede
Modified: 2014-03-17 03:20 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-21 17:30:06 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
PATCH: don't sleep and do killall5 -9 if not needed (552 bytes, patch)
2009-09-19 12:17 UTC, Hans de Goede
no flags Details | Diff

Description Hans de Goede 2009-09-19 12:17:00 UTC
Created attachment 361756 [details]
PATCH: don't sleep and do killall5 -9 if not needed

killall5 has gotten a useful return value as part of the
sysvinit-tools-2.87 upgrade.

It will now return the following:
0: successfully signaled one or more processed
1: could not read /proc
2: no processes found to signal

We can use this by checking the return value of the first killall5
to avoid the 2nd killall5 if no processes to kill were found.

Note that this also means, that if the second killall5 does get called,
but the processes have already terminated as a result of the first, the
action will show [FAILED], this ought to be fixed too, but I was not sure
what was the best way to do this.


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