diff options
author | Ulrich Müller <ulm@gentoo.org> | 2009-04-16 08:59:28 +0000 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2009-04-16 08:59:28 +0000 |
commit | eebad679524173ed535fac17bd2b0a117f44ef81 (patch) | |
tree | eb112726f510616fb0b21722781d6d486c4b0474 /libs/core.bash.in | |
parent | Whitespace. (diff) | |
download | eselect-eebad679524173ed535fac17bd2b0a117f44ef81.tar.gz eselect-eebad679524173ed535fac17bd2b0a117f44ef81.tar.bz2 eselect-eebad679524173ed535fac17bd2b0a117f44ef81.zip |
Suppress error messages from pgrep and kill, bugs 174354 and 264734.
svn path=/trunk/; revision=429
Diffstat (limited to 'libs/core.bash.in')
-rw-r--r-- | libs/core.bash.in | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libs/core.bash.in b/libs/core.bash.in index 3c647e6..baad085 100644 --- a/libs/core.bash.in +++ b/libs/core.bash.in @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright (c) 2005-2006 Gentoo Foundation. +# Copyright (c) 2005-2009 Gentoo Foundation. # $Id$ # This file is part of the 'eselect' tools framework. # @@ -60,9 +60,11 @@ die() { # Evil, but effective. kill ${ESELECT_KILL_TARGET} - childs=$(pgrep -P ${ESELECT_KILL_TARGET}) - for process in ${ESELECT_KILL_TARGET} ${childs} ; do - kill -9 ${process} + # Is this actually needed? Killing the parent should be enough. + local children process + children=$(pgrep -P ${ESELECT_KILL_TARGET} 2>/dev/null) + for process in ${ESELECT_KILL_TARGET} ${children} ; do + kill -9 ${process} &>/dev/null done exit 249 } |