[libvirt] Re: [Libvir] [PATCH] lxc: handle SIGCHLD from exiting container

Dave Leskovec dlesko at linux.vnet.ibm.com
Tue May 6 20:43:13 UTC 2008


Jim Meyering wrote:
...
>> Index: b/qemud/qemud.c
>> ===================================================================
> ...
>> +static void sig_handler(int sig, siginfo_t * siginfo,
>> +                        void* context ATTRIBUTE_UNUSED) {
> ...
>> -    unsigned char sigc;
>> +    siginfo_t siginfo;
>>      int ret;
>>
>> -    if (read(server->sigread, &sigc, 1) != 1) {
>> +    if (read(server->sigread, &siginfo, sizeof(siginfo)) != sizeof(siginfo)) {
> 
> Looks good, but that should be saferead instead of "read".
> Now that it's reading more than one byte, EINTR can make a difference.

Yes, I'll change this to saferead()

> 
> Also, it'd make it a tiny bit easier for people who reply to you
> if you did not put code after your signature.
> Or at least not after the "-- " signature-introducer.
> Some mail clients (at least Gnus) ">"-quote only the part
> of your message that comes before the signature.

Well, I've been sending patches as attachments since my early ones were getting
mangled.  I guess options would be not send them as attachments and fix the
mangling, or remove the "-- " signature-introducer.

-- 
Best Regards,
Dave Leskovec
IBM Linux Technology Center
Open Virtualization




More information about the libvir-list mailing list