xfs
[Top] [All Lists]

Re: [PATCH v2 5/7] xfsdump: rework dialog to use main signal handler

To: Bill Kendall <wkendall@xxxxxxx>
Subject: Re: [PATCH v2 5/7] xfsdump: rework dialog to use main signal handler
From: Alex Elder <aelder@xxxxxxx>
Date: Wed, 10 Aug 2011 16:47:53 -0500
Cc: <xfs@xxxxxxxxxxx>
In-reply-to: <1312497011-24840-6-git-send-email-wkendall@xxxxxxx>
References: <1312497011-24840-1-git-send-email-wkendall@xxxxxxx> <1312497011-24840-6-git-send-email-wkendall@xxxxxxx>
Reply-to: <aelder@xxxxxxx>
On Thu, 2011-08-04 at 17:30 -0500, Bill Kendall wrote:
> xfsdump currently swaps in a different signal handler for the duration
> of a dialog. This patch changes the code to have a global signal
> handler which will first give the dialog a chance to process the
> signal. If a dialog is not active or if it is not interested in the
> signal, the signal will be processed as usual.

Yay!  I guess I wasn't alone in being confused by
the signal handlers...

> There is one side effect to this change. SIGQUIT is now caught in the
> miniroot/pipeline case as the handler needs to be setup in case a
> dialog needs it. The signal handler will exit in this case just as
> if SIGQUIT was not caught, the only real difference being that a
> core file will not be generated.

Sounds OK to me.

Your dialog signal handler is clever, and I like it.
Again you should make dlog_registered_sigs have a
"volatile" qualifier.

Otherwise this looks good.

Reviewed-by: Alex Elder <aelder@xxxxxxx>

> Signed-off-by: Bill Kendall <wkendall@xxxxxxx>


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