From: ptkwt@...1.aracnet.com (Phil Tomson) Date: 2001-04-29T13:40:04+09:00 Subject: [ruby-talk:14397] Re: [REPOST] Retrieving current signal handler without altering it In article , Lloyd Zusman wrote: >[ Note: I posted this question a couple weeks ago, but I'm not > sure if it properly propagated. Therefore, I'm trying > again. Please forgive me if you've already seen it. ] > >I'd like to retrieve the current handler for a given signal without >changing it. I know that I can do this: > > currentHandler = trap('HUP') { ... whatever ... } > >However, I don't want to change the current handler to something new; >rather, I only want to retrieve its current value. > >Any ideas? > How about: currentHandler = trap('HUP','DEFAULT') I think that's what you're looking for. Phil