[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mesos-dev
Subject:    [jira] [Closed] (MESOS-319) Fix buggy read / write calls.
From:       "Benjamin Hindman (JIRA)" <jira () apache ! org>
Date:       2013-01-31 5:17:13
Message-ID: JIRA.12623646.1355360125017.220727.1359609433356 () arcas
[Download RAW message or body]


     [ https://issues.apache.org/jira/browse/MESOS-319?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel \
]

Benjamin Hindman closed MESOS-319.
----------------------------------

    
> Fix buggy read / write calls.
> -----------------------------
> 
> Key: MESOS-319
> URL: https://issues.apache.org/jira/browse/MESOS-319
> 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 https://reviews.apache.org/r/8423/
> "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: http://www.atlassian.com/software/jira


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic