Bug 524359

Summary: PATCH: don't sleep and do killall5 -9 if not needed
Product: [Fedora] Fedora Reporter: Hans de Goede <hdegoede>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: notting, rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-21 17:30:06 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:
Attachments:
Description Flags
PATCH: don't sleep and do killall5 -9 if not needed none

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.