diff options
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 } |