New fedora-rpmdevtools: cleanup old stuff

Michal Jaegermann michal at
Mon Mar 21 17:41:13 UTC 2005

On Mon, Mar 21, 2005 at 09:55:29AM +0200, Ville Skyttä wrote:
> > gconfd_pids=$(pidof gconfd-2) && kill -HUP $gconfd_pids
> This will break the same way as the original killall -HUP when there's
> no gconfd-2 running (pidof exits with non-zero).

Err... no.  If pidof exits with non-zero then 'kill -HUP ...' does
not run.  That was the point.

> Another quick "fix":
> gconfd_pids=$(pidof gconfd-2) && kill -HUP $gconfd_pids || :

If you really think that with some variant of pidof you may run
with an empy $gconfd_pids list then check explicitely for that

gconfd_pids=$(pidof gconfd-2) && [ "$gconfd_pids" ] && kill -HUP $gconfd_pids

but this is already paranoid.  Maybe you meant

 kill -HUP $(pidof gconfd-2) >/dev/null 2>&1 || :

This is not really so clean and

 pkill -HUP gconfd-2

already checks if there are processes to which to send a signal but
then you have a dependency on procps.  I am not sure if that can
be reasonably assumed.


More information about the fedora-extras-list mailing list