From: Cyrill Gorcunov <gorcunov@gmail.com>
To: Timur Safin <tsafin@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org,
'Vladislav Shpilevoy' <v.shpilevoy@tarantool.org>
Subject: Re: [Tarantool-patches] [PATCH] Work-around WSL assert when SO_LINGER is set on unix sockets
Date: Wed, 11 Mar 2020 13:53:15 +0300 [thread overview]
Message-ID: <20200311105315.GJ27301@uranus> (raw)
In-Reply-To: <06c001d5f791$df13e800$9d3bb800$@tarantool.org>
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.
next prev parent reply other threads:[~2020-03-11 10:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-10 14:25 Timur Safin
2020-03-11 0:30 ` Vladislav Shpilevoy
2020-03-11 10:43 ` Timur Safin
2020-03-11 10:53 ` Cyrill Gorcunov [this message]
2020-03-11 23:32 ` Vladislav Shpilevoy
2020-03-12 8:39 ` Timur Safin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200311105315.GJ27301@uranus \
--to=gorcunov@gmail.com \
--cc=tarantool-patches@dev.tarantool.org \
--cc=tsafin@tarantool.org \
--cc=v.shpilevoy@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH] Work-around WSL assert when SO_LINGER is set on unix sockets' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox