From: "ara.t.howard" Date: 2008-04-16T10:10:19+09:00 Subject: Re: at_exit handlers and Process.kill On Apr 15, 2008, at 11:25 AM, Tim Pease wrote: > cleanup = lambda { > next if $cleanup_was_already_done > $cleanup_was_already_done = true > # your cleanup code goes here > } > > Signal.list.values.each do |signal| > Signal.trap(signal,&cleanup) > end cleanup = lambda do cleanup = lambda{} p 'cleanup' end a @ http://codeforpeople.com/ -- we can deny everything, except that we have the possibility of being better. simply reflect on that. h.h. the 14th dalai lama