----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/39348/#review102931 -----------------------------------------------------------
3rdparty/libprocess/src/io.cpp (line 144) <https://reviews.apache.org/r/39348/#comment160764> We can move saving and restoring errno inside the "if" block below, I believe. - Neil Conway On Oct. 15, 2015, 6:03 p.m., James Peach wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/39348/ > ----------------------------------------------------------- > > (Updated Oct. 15, 2015, 6:03 p.m.) > > > Review request for mesos and Ben Mahler. > > > Bugs: MESOS-2079 > https://issues.apache.org/jira/browse/MESOS-2079 > > > Repository: mesos > > > Description > ------- > > OS X will raise SIGPIPE against the process rathr than the triggerring > thread, causing the SUPPRESS macro to sometimes fail to squash the > signal. The right way to avoid this on OS X to block SIGPIPE in the > process (which we are loth to do in libprocess), or to request that > SIGPIPE not be raised on a particular file descriptor. > > - Add os::nonSigpipe() helper to check whether SIPIPE is suppressed > on a file descriptor. > - Add os::nosigpipe() to enable or disable SIGPIPE suppression. > - Use os::nosigpipe() to suppress SIGPIPE when we create sockets. > - Check and restore the SIGPIPE status in process::io::internal::write(), > which makes repeated iterations of the IOTest.Write test reliable. > > > Diffs > ----- > > 3rdparty/libprocess/include/process/network.hpp > 61bfa8243728dc19ab0e6fb43d33ca83fb3709c3 > 3rdparty/libprocess/src/io.cpp 26686e1a96484e3f09d41a7292f38b7579ce9c48 > > Diff: https://reviews.apache.org/r/39348/diff/ > > > Testing > ------- > > OS X and CentOS 6 > make && make check > > > Thanks, > > James Peach > >