From reviews-return-50382-apmail-mesos-reviews-archive=mesos.apache.org@mesos.apache.org Thu Nov 17 19:04:05 2016 Return-Path: X-Original-To: apmail-mesos-reviews-archive@minotaur.apache.org Delivered-To: apmail-mesos-reviews-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A999B19C88 for ; Thu, 17 Nov 2016 19:04:05 +0000 (UTC) Received: (qmail 68720 invoked by uid 500); 17 Nov 2016 19:04:05 -0000 Delivered-To: apmail-mesos-reviews-archive@mesos.apache.org Received: (qmail 68692 invoked by uid 500); 17 Nov 2016 19:04:05 -0000 Mailing-List: contact reviews-help@mesos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: reviews@mesos.apache.org Delivered-To: mailing list reviews@mesos.apache.org Received: (qmail 68672 invoked by uid 99); 17 Nov 2016 19:04:05 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Nov 2016 19:04:05 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 563F51CF890; Thu, 17 Nov 2016 19:04:04 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============4117147688582573349==" MIME-Version: 1.0 Subject: Re: Review Request 53474: Support explicit error codes in ErrnoError and SocketError. From: James Peach To: Michael Park Cc: James Peach , mesos Date: Thu, 17 Nov 2016 19:04:04 -0000 Message-ID: <20161117190404.20484.76951@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: James Peach X-ReviewGroup: mesos X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/53474/ X-Sender: James Peach References: <20161116222535.20485.13220@reviews.apache.org> In-Reply-To: <20161116222535.20485.13220@reviews.apache.org> Reply-To: James Peach X-ReviewRequest-Repository: mesos --===============4117147688582573349== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit > On Nov. 16, 2016, 10:25 p.m., Michael Park wrote: > > 3rdparty/stout/include/stout/os/posix/rmdir.hpp, lines 57-58 > > > > > > This is great! > > > > It seems like we have more opportunities to update here: > > > > ``` > > 3rdparty/libprocess/src/libevent_ssl_socket.cpp > > 166: errno = ENOTCONN; > > 167- return ErrnoError(); > > ``` > > ``` > > 3rdparty/libprocess/src/poll_socket.cpp > > 138-#ifdef __WINDOWS__ > > 139- ::WSASetLastError(opt); > > 140-#else > > 141: errno = opt; > > 142-#endif > > 143- > > 144- return Failure(SocketError("Failed to connect to " + stringify(to))); > > ``` > > ``` > > 3rdparty/stout/include/stout/windows/os.hpp > > 254: errno = ENOSYS; > > 255- return ErrnoError( > > 261: errno = ENOSYS; > > 262- return ErrnoError( > > 294: errno = ECHILD; > > 295- return WindowsError( > > 305: errno = ECHILD; > > 306- return WindowsError( > > 324: errno = ECHILD; > > 325- return WindowsError( > > ``` > > ``` > > 3rdparty/stout/include/stout/os/windows/su.hpp > > 55: SetLastError(ERROR_NOT_SUPPORTED); > > 56- return WindowsError(); > > ``` > > ``` > > 3rdparty/stout/include/stout/windows/fs.hpp > > 122: ::SetLastError(error); > > 123- return WindowsError( > > 124- "'fs::list': 'FindNextFile' failed when searching for files with " > > 125- "'pattern '" + pattern + "'"); > > ``` > > Michael Park wrote: > Ah, I see that the first two `libevent_ssl_socket.cpp` and `poll_socket.cpp` are covered by https://reviews.apache.org/r/53475/. The Windows implementation of `os::waitpid` deliberately sets `errno` in an attempt to be compatible with the the POSIX version. Callers assume that it will set `errno`. I think it is best to leave this alone for now. - James ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/53474/#review156121 ----------------------------------------------------------- On Nov. 4, 2016, 11:03 p.m., James Peach wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/53474/ > ----------------------------------------------------------- > > (Updated Nov. 4, 2016, 11:03 p.m.) > > > Review request for mesos and Michael Park. > > > Bugs: MESOS-6520 > https://issues.apache.org/jira/browse/MESOS-6520 > > > Repository: mesos > > > Description > ------- > > Support explicit error codes in ErrnoError and SocketError. > > > Diffs > ----- > > 3rdparty/stout/include/stout/errorbase.hpp 96d395d37cdad706c2f23fdd9caeefc2a33e0541 > 3rdparty/stout/include/stout/os/posix/rmdir.hpp 5657b5a18aaedf842b7b780ea7eada73118788cb > 3rdparty/stout/include/stout/windows/error.hpp f296b82c47ef5ae36f6e5ee4dd289cb15bd200a6 > 3rdparty/stout/tests/error_tests.cpp 25b50141dd9bbf163aa816750210b298456740a8 > > Diff: https://reviews.apache.org/r/53474/diff/ > > > Testing > ------- > > make check on Fedora 24 > > > Thanks, > > James Peach > > --===============4117147688582573349==--