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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
signal.

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux