[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20170109.163749.326273890394714115.davem@davemloft.net>
Date: Mon, 09 Jan 2017 16:37:49 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: cugyly@....com
Cc: netdev@...r.kernel.org, Linyu.Yuan@...atel-sbell.com.cn
Subject: Re: [PATCH] net: fix accept4() flags not work
From: yuan linyu <cugyly@....com>
Date: Sun, 8 Jan 2017 18:47:30 +0800
> From: yuan linyu <Linyu.Yuan@...atel-sbell.com.cn>
>
> user input flags store to newsock which should be used.
>
> Signed-off-by: yuan linyu <Linyu.Yuan@...atel-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.
Powered by blists - more mailing lists