[Bugs] [Bug 1409767] New: The API glfs_h_poll_upcall cannot return 0 and set an errno to denote no entries

bugzilla at redhat.com bugzilla at redhat.com
Tue Jan 3 09:58:43 UTC 2017


https://bugzilla.redhat.com/show_bug.cgi?id=1409767

            Bug ID: 1409767
           Summary: The API glfs_h_poll_upcall cannot return 0 and set an
                    errno to denote no entries
           Product: GlusterFS
           Version: mainline
         Component: libgfapi
          Assignee: bugs at gluster.org
          Reporter: srangana at redhat.com
        QA Contact: sdharane at redhat.com
                CC: bugs at gluster.org



As per the errno man page,
"The  <errno.h> header file defines the integer variable errno, which is set by
system calls and some library functions in the event of an error to indicate
what went wrong.  Its value is significant
       only when the return value of the call indicated an error (i.e., -1 from
most system calls; -1 or NULL from most library functions); a function that
succeeds is allowed to change errno."

The interface for this function expects the consumer to check either the cbk or
the errno on success, the latter is either incorrect, or the code in gfapi
needs to reset errno to 0 on success to ensure that the errno returned when the
call succeeds is zero.

This bug is to track and change this behavior or provide rationale for the
current state of the API.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Bugs mailing list