From: Michael Kerrisk <mtk-manpages@gmx.net>
To: Andi Kleen <andi@firstfloor.org>
Cc: Shay Goikhman <GOIKHMAN@il.ibm.com>,
netdev@vger.kernel.org, davem@davemloft.net
Subject: Re: Problem with semantics?
Date: Mon, 27 Aug 2007 17:46:09 +0200 [thread overview]
Message-ID: <46D2F1C1.2050606@gmx.net> (raw)
In-Reply-To: <p737inzne6i.fsf@bingen.suse.de>
Hi Andi,
Andi Kleen wrote:
> Shay Goikhman <GOIKHMAN@il.ibm.com> writes:
>
>> Dear Linux maintainers,
>>
>> I'm doing :
>>
>> setsockopt(s, SO_RCVTIMEO, t1 ); // set time-out
>> t1 on socket while block receiving on it
>> select(,,, &fd_set_including(s), .., &errs, t2); // block till
>> receive or time-out t 2 jointly on a set of sockets
>>
>> Apparently, I could no find reference on the coupled behavior of the two
>> above statements in Linux documentation.
>> As I understand the blocking semantics, I would expect that if t1<t2 ,
>> select should return after t1 with the descriptor 's' in 'errs' if 's' does
>> not become readable in the t1 interval.
>>
>> It is not so in life -- select ignores t1 altogether.
>>
>> Do you have some enlightening knowledge on the matter?
>
> RCVTIMEO only applies to recvmsg et.al., similar to SNDTIMEO only
> apply to sendmsg etc. But select/poll only report events, they
> do not actually send or receive by themselves.
>
> Michael, perhaps you can clarify that in the manpages
I added the following to sockets.7:
Timeouts have
effect for socket I/O calls (read(2), recv(2),
recvfrom(2), recvmsg(2), write(2), send(2),
sendto(2), sendmsg(2)); timeouts have no effect for
select(2), poll(2), epoll_wait(2), etc.
The change will be in man-pages-2.65.
Thanks for your note.
Cheers,
Michael
--
Michael Kerrisk
maintainer of Linux man pages Sections 2, 3, 4, 5, and 7
Want to help with man page maintenance? Grab the latest tarball at
http://www.kernel.org/pub/linux/docs/manpages/
read the HOWTOHELP file and grep the source files for 'FIXME'.
prev parent reply other threads:[~2007-08-27 15:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-13 17:07 Problem with semantics? Shay Goikhman
2007-08-14 0:38 ` Andi Kleen
2007-08-27 15:46 ` Michael Kerrisk [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=46D2F1C1.2050606@gmx.net \
--to=mtk-manpages@gmx.net \
--cc=GOIKHMAN@il.ibm.com \
--cc=andi@firstfloor.org \
--cc=davem@davemloft.net \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.