bin/shaft in shaft-0.5.1 vs bin/shaft in shaft-0.6
- old
+ new
@@ -70,11 +70,15 @@
method_options :name => :string
def stop(name)
active = get_active
if active.has_key? name
say "Stopping tunnel '#{name}' at pid #{active[name]}..."
- Process.kill "INT", active[name]
- say "Stopped."
+ begin
+ Process.kill "INT", active[name]
+ say "Stopped."
+ rescue Errno::ESRCH
+ say "Tunnel wasn't active (zombie shaft item)."
+ end
#TODO verify killing?
active.delete(name)
set_active(active)