From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-f67.google.com (mail-lf1-f67.google.com [209.85.167.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 95BDE469719 for ; Wed, 11 Mar 2020 13:53:18 +0300 (MSK) Received: by mail-lf1-f67.google.com with SMTP id i19so1302676lfl.1 for ; Wed, 11 Mar 2020 03:53:18 -0700 (PDT) Date: Wed, 11 Mar 2020 13:53:15 +0300 From: Cyrill Gorcunov Message-ID: <20200311105315.GJ27301@uranus> References: <045901d5f6e7$bc2d47a0$3487d6e0$@tarantool.org> <1e1a11dc-cce3-603d-69f0-3dabf371d59a@tarantool.org> <06c001d5f791$df13e800$9d3bb800$@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <06c001d5f791$df13e800$9d3bb800$@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH] Work-around WSL assert when SO_LINGER is set on unix sockets List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Timur Safin Cc: tarantool-patches@dev.tarantool.org, 'Vladislav Shpilevoy' On Wed, Mar 11, 2020 at 01:43:16PM +0300, Timur Safin wrote: > > : > - /* Send all buffered messages on socket before take > : > - * control out from close(2) or shutdown(2). */ > : > - struct linger linger = { 0, 0 }; > : > + if (family != AF_UNIX) { > : > : 6. Is there any proof that it is no-op on Linux for AF_UNIX? Yes. The SO_LINGER setup interal SOCK_LINGER socket flag which is used in inet streamed sockets (and a few other places). For unix sockets it is not used. Still this approach is somehow fragile. As to me such specifics should either handled by #ifdef which would recognize WSL or we need some bootstrap runtime testing (which will simply be more confusing). IOW, I propose to detect WSL on cmake level and #ifdef the things which are not supported.