[Top] [All Lists]

Re: [PATCH 4/4] xfsdump: convert to the POSIX signal API

To: Bill Kendall <wkendall@xxxxxxx>
Subject: Re: [PATCH 4/4] xfsdump: convert to the POSIX signal API
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Thu, 4 Aug 2011 08:37:12 -0400
Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>, xfs@xxxxxxxxxxx
In-reply-to: <4E3A91F8.3080606@xxxxxxx>
References: <1311972011-1446-1-git-send-email-wkendall@xxxxxxx> <1311972011-1446-5-git-send-email-wkendall@xxxxxxx> <20110803104813.GA3575@xxxxxxxxxxxxx> <4E393AE3.70505@xxxxxxx> <20110803123934.GA13447@xxxxxxxxxxxxx> <4E39A176.7000906@xxxxxxx> <20110804075331.GA8836@xxxxxxxxxxxxx> <4E3A91F8.3080606@xxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Thu, Aug 04, 2011 at 07:35:04AM -0500, Bill Kendall wrote:
> Right, with some rework of that handler. It would have to do
> something like:
>   case SIGINT:
>       if (is_dialog_active(SIGINT))
>           dlg_sigterm_received = BOOL_TRUE;
>       else
>           sigterm_received = BOOL_TRUE;
> (The SIGINT param is needed because it's optional whether a
> dialog handles a particular signal.)
> Otherwise we'd race between main's use of sigterm_received and
> the dialog's need to use it.
> Do you prefer this over the signal handler swap?

This seems cleaner to me.  The upside is that we a) don't have
to mess with changing signal handlers all the time, and b)
that we don't really have to bother who is going to receive the

<Prev in Thread] Current Thread [Next in Thread>