Re: [Evolution] Evolution not listening to quit
- From: Ralf Mardorf <silver bullet zoho com>
- To: evolution-list gnome org
- Subject: Re: [Evolution] Evolution not listening to quit
- Date: Sun, 2 Jun 2019 13:26:41 +0200
On 02 Jun 2019 12:55:00 +0200, Michael Hirmke wrote:
_me=$( basename $0 )
EVOL="evolution"
killevolution() {
$EVOL --force-shutdown
sleep 1
_pid=""
_pid=$( \
/usr/bin/ps -wwfe \
| grep -i "${EVOL}" \
| grep -v "grep" \
| grep -v "${_me}" \
| grep "^${USER}" \
| awk '{ print $2 }' \
)
if [ -n "$_pid" ]
then
for _p in $_pid
do
kill $_p
done
fi
}
Ok, a signal 15 might imply that it doesn't matter in what order to kill
evolution related processes, OTOH 'if...then' without verifying that the
processes are gone away, before continuing, gains nothing at all. Even
if you would send a signal 9, you should test, if the process is
already killed, before continuing. Even much unlikely race conditions do
happen very often.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]