Re: [PATCHv2] virnetserver: handle sigaction correctly

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

 



On 04/19/2012 09:55 PM, Wen Congyang wrote:
> At 04/20/2012 11:45 AM, Eric Blake Wrote:
>> POSIX says that sa_sigaction is only safe to use if sa_flags
>> includes SA_SIGINFO; conversely, sa_handler is only safe to
>> use when flags excludes that bit.  Gnulib doesn't guarantee
>> an implementation of SA_SIGINFO, but does guarantee that
>> if SA_SIGINFO is undefined, we can safely define it to 0 as
>> long as we don't dereference the 2nd or 3rd argument of
>> any handler otherwise registered via sa_sigaction.
>>
>> Based on a report by Wen Congyang.
>>

>> -static void virNetServerSignalHandler(int sig, siginfo_t * siginfo,
>> -                                      void* context ATTRIBUTE_UNUSED)
>> +static void
>> +virNetServerSignalHandler(int sig, siginfo_t * siginfo ATTRIBUTE_UNUSED,
> 
> Why siginfo has the attribute ATTRIBUTE_UNUSED?

I guess I copied too much from other locations; I've removed the
attribute (on mingw, the variable is still considered 'used' even though
its only use is in dead code).

> ACK with nit fixed.

Thanks; pushed.

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]