[Top][All Lists]

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

[Freeipmi-devel] [bug #43611] select might return with EINTR in _openipm

From: anonymous
Subject: [Freeipmi-devel] [bug #43611] select might return with EINTR in _openipmi_read
Date: Fri, 14 Nov 2014 14:33:21 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/38.0.2125.111 Chrome/38.0.2125.111 Safari/537.36


                 Summary: select might return with EINTR in _openipmi_read
                 Project: GNU FreeIPMI
            Submitted by: None
            Submitted on: Fri 14 Nov 2014 02:33:20 PM UTC
                Category: libfreeipmi
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Improper Behaviour
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
        Operating System: GNU/Linux



ipmi_cmd_raw() sometimes returns with < 0 which indicates an error. We have a
specific case where this is caused by the select() function on line 510 in the
file ipmi-openipmi-driver.c. This select returns with -1 and sets errno to
EINTR, which indicates that the select has received a signal and hence
It is my understanding that this can happen during an select especially when
working with an external resource. This is however not an unrecoverable error
which should lead to ipmi_cmd_raw() ending with an error. Usually, as I
understand, the select() can, and should, be retried multiple times in case of
an EINTR. In this way ipmi_cmd_raw() can return without an error and the
correct value read.
I'd like to propose the attached patch, which retries the select a specific
number of times in case of an failed select caused by EINTR. In other cases it
does not attempt to retry and behaves like before.


File Attachments:

Date: Fri 14 Nov 2014 02:33:20 PM UTC  Name:
ipmi-openipmi-driver.c__2014_11_14_001.patch  Size: 1kB   By: None



Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]