incubator-mesos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Hindman (JIRA)" <>
Subject [jira] [Resolved] (MESOS-319) Fix buggy read / write calls.
Date Thu, 31 Jan 2013 05:17:13 GMT


Benjamin Hindman resolved MESOS-319.

    Resolution: Fixed
> Fix buggy read / write calls.
> -----------------------------
>                 Key: MESOS-319
>                 URL:
>             Project: Mesos
>          Issue Type: Bug
>            Reporter: Benjamin Mahler
>            Assignee: Benjamin Mahler
> We don't handle EINTR and partial read / write calls.
> See my comment below from
> "POSIX allows a read() that is interrupted after reading some data to return -1 (with
errno set to EINTR) or to return the number of bytes already read."
> Therefore, we need to handle both EINTR and partial reads (with a read loop).
> Keeping this in the os.hpp read/write helpers would make things easier (I see the same
mistake made there).
> Added TODOs for now, and at some point I'd like to fix these.
> Likewise for write:
> "Conforming to
> SVr4, 4.3BSD, POSIX.1-2001.
> Under SVr4 a write may be interrupted and return EINTR at any point, not just before
any data is written.
> Notes
> <snip>
> If a write() is interrupted by a signal handler before any bytes are written, then the
call fails with the error EINTR; if it is interrupted after at least one byte has been written,
the call succeeds, and returns the number of bytes written."

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message