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.

_______________________________________________
evolution-list mailing list
evolution-list@gnome.org
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-list

Reply via email to