wmiirc-rumai

git clone git://oldgit.suckless.org/wmiirc-rumai/
Log | Files | Refs | README | LICENSE

commit b0a7d50a77b45763cbb935296533573dbe714c14
parent d87b46995823aea968419851fdd11661f0f43dbe
Author: Suraj N. Kurapati <sunaku@gmail.com>
Date:   Fri, 13 Apr 2007 10:45:56 -0700

fix existing wmiirc instances were refusing to die

Diffstat:
wmiirc | 12++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/wmiirc b/wmiirc @@ -26,13 +26,13 @@ end LOG.info "birth" # terminate existing instances of this program - `ps -C #{File.basename $0} -o pid h`. - split. - map! {|s| s.to_i}. - reject! {|pid| pid == $$}. - each do |pid| + + instances = `ps -C #{File.basename $0} -o pid h`.split.map! {|s| s.to_i} + instances.delete $$ # do not kill self! + + instances.each do |pid| LOG.info "slaying ##{pid}" - Process.kill :SIGTERM, pid + Process.kill :SIGKILL, pid end # load the configuration