From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 3250027546 for ; Tue, 27 Aug 2019 19:54:15 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1eKAsVwN6W11 for ; Tue, 27 Aug 2019 19:54:15 -0400 (EDT) Received: from smtp63.i.mail.ru (smtp63.i.mail.ru [217.69.128.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id E11E7274FB for ; Tue, 27 Aug 2019 19:54:14 -0400 (EDT) Date: Wed, 28 Aug 2019 02:54:12 +0300 From: Kirill Yukhin Subject: [tarantool-patches] Re: [PATCH] Enable support for NOTIFY_SOCKET on macOS Message-ID: <20190827235412.rhsroptfhxghzgun@tarantool.org> References: <20190819082813.38237-1-m.melentiev@corp.mail.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190819082813.38237-1-m.melentiev@corp.mail.ru> Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: tarantool-patches@freelists.org Cc: Max Melentiev Hello, On 19 авг 11:28, Max Melentiev wrote: > To make it possible to develop and test related features on macOS. > > SOCK_CLOEXEC (not available on macOS) flag for socket() > is replaced with `fcntl(fd, F_SETFD, FD_CLOEXEC)` which has the same effect. > > MSG_NOSIGNAL flag for sendmsg is also not available on macOS. > However it has SO_NOSIGPIPE flag for setsockopt which disables SIGPIPE. > So it requires different solution for different OS. > Inspired by https://nwat.xyz/blog/2014/01/16/porting-msg_more-and-msg_nosigpipe-to-osx/ > > `sendmsg()` is replaced with `sendto()` because `msg_namelen` was calculated incorrectly. > New method builds message automatically without errors. I've checked your patch into 2.2 and master. -- Regards, Kirill Yukhin