Re: [PATCH v2 6/7] xfsdump: convert to the POSIX signal API

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

 



On 08/12/2011 03:45 PM, Christoph Hellwig wrote:
On Fri, Aug 12, 2011 at 02:15:58PM -0500, Bill Kendall wrote:
Is there any requirement that the fields
other than sa_flags and sa_handler should
be zeroed before use?

The sa_sigaction field will only be used if sa_flags
has SA_SIGINFO set, and the sa_restored field is obsolete
and not specified by POSIX. Better to explicitly initialize
everything though, so I'll change that.

sigaction actuall is a rare case where this is harmful.  To quote
the manpage:

	On some architectures a union is involved:  do not assign to both
	sa_handler and sa_sigaction.

Thanks, I do remember reading this now. I'll leave the code as is,
which sets sa_handler instead of sa_sigaction, and does not touch
the obsolete (possibly undefined) sa_restorer. The rest of the
fields are initialized.

Bill

_______________________________________________
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