From: "David S." Date: 2001-04-29T14:07:30+09:00 Subject: [ruby-talk:14398] Re: [REPOST] Retrieving current signal handler without altering it On Sun, Apr 29, 2001 at 01:40:04PM +0900, Phil Tomson wrote: > > > >I'd like to retrieve the current handler for a given signal without > >changing it. I know that I can do this: > > > How about: > > currentHandler = trap('HUP','DEFAULT') > > I think that's what you're looking for. That command will set the handler to the default. If that's not what you want, you have to restore it with trap('HUP', currentHandler) which introduces a race condition. Without an interface to 'sigaction', I don't think you can safely retrieve a signal handler. David S.