From: David Miller <davem@davemloft.net>
To: cugyly@163.com
Cc: netdev@vger.kernel.org, Linyu.Yuan@alcatel-sbell.com.cn
Subject: Re: [PATCH] net: fix accept4() flags not work
Date: Mon, 09 Jan 2017 16:37:49 -0500 (EST) [thread overview]
Message-ID: <20170109.163749.326273890394714115.davem@davemloft.net> (raw)
In-Reply-To: <1483872450-2706-1-git-send-email-cugyly@163.com>
From: yuan linyu <cugyly@163.com>
Date: Sun, 8 Jan 2017 18:47:30 +0800
> From: yuan linyu <Linyu.Yuan@alcatel-sbell.com.cn>
>
> user input flags store to newsock which should be used.
>
> Signed-off-by: yuan linyu <Linyu.Yuan@alcatel-sbell.com.cn>
It is the file flags of the parent listening socket that determines if
the accept() blocks or not.
The man page for accept() is clear about this:
... and the socket is not marked as nonblocking
meaning the parent listening socket.
The "flags" argument of accept4() is purely for setting flags on
the accepted new child socket, it has no influence whatsoever
about the blocking of the accept() call or not. That behavior
is determined in the context of the listening socket.
prev parent reply other threads:[~2017-01-09 21:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-08 10:47 [PATCH] net: fix accept4() flags not work yuan linyu
2017-01-09 21:37 ` David Miller [this message]
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=20170109.163749.326273890394714115.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=Linyu.Yuan@alcatel-sbell.com.cn \
--cc=cugyly@163.com \
--cc=netdev@vger.kernel.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).