From: Chris Friesen <cfriesen@nortelnetworks.com>
To: aeb@cwi.nl
Cc: Andi Kleen <ak@suse.de>, Michael T Kerrisk <mtk-lists@gmx.net>,
netdev@oss.sgi.com
Subject: Re: asymmetry with MSG_DONTWAIT in sendmsg() and recvmsg()
Date: Thu, 08 Jul 2004 12:49:28 -0400 [thread overview]
Message-ID: <40ED7B18.800@nortelnetworks.com> (raw)
In-Reply-To: <20040708162703.GA12934@wotan.suse.de>
[-- Attachment #1: Type: text/plain, Size: 1468 bytes --]
Andi Kleen wrote:
> On Thu, Jul 08, 2004 at 12:21:35PM -0400, Chris Friesen wrote:
> > Michael T Kerrisk wrote:
> >
> > >MSG_DONTWAIT should also work with recvmsg().
> >
> > Hmm... Just tried it with a DGRAM socket, and it seems to work. Any
> ideas
> > why its not in the man pages?
>
> Nobody ever added it? Just send a patch to aeb@cwi.nl
Sending patch as suggested. Fundamentally, the delta is as follows, I've
included an attachment with what I hope are the proper formatting codes (copied
from send(2)).
--- recv.man 2004-07-08 15:43:17.000000000 -0400
+++ recv2.man 2004-07-08 15:47:29.000000000 -0400
@@ -67,6 +67,11 @@
disconnect occurs, or the next data to be received is of a dif-
ferent type than that returned.
+ MSG_DONTWAIT
+ Enables non-blocking operation; if the operation would block,
+ EAGAIN is returned (this can also be enabled using the O_NON-
+ BLOCK with the F_SETFL fcntl(2)).
+
MSG_NOSIGNAL
This flag turns off raising of SIGPIPE on stream sockets when
the other end disappears.
Note also that there is a mention of MSG_DONTWAIT in the msg_flags field in the
msghdr. It gives the impression that one can *set* that field to cause the
non-blocking behaviour. My understanding is that the msg_flags field is a
return value only. Perhaps that portion should be reworded as well.
Chris
[-- Attachment #2: man2recv.diff --]
[-- Type: application/octet-stream, Size: 741 bytes --]
next prev parent reply other threads:[~2004-07-08 16:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-07 13:42 asymmetry with MSG_DONTWAIT in sendmsg() and recvmsg() Chris Friesen
2004-07-08 8:34 ` Michael T Kerrisk
2004-07-08 16:21 ` Chris Friesen
2004-07-08 16:27 ` Andi Kleen
2004-07-08 16:49 ` Chris Friesen [this message]
2004-07-08 17:07 ` Andries Brouwer
2004-07-08 18:33 ` Chris Friesen
2004-07-08 19:05 ` Andries Brouwer
2004-07-08 17:25 ` Nivedita Singhvi
2004-07-08 18:34 ` Chris Friesen
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=40ED7B18.800@nortelnetworks.com \
--to=cfriesen@nortelnetworks.com \
--cc=aeb@cwi.nl \
--cc=ak@suse.de \
--cc=mtk-lists@gmx.net \
--cc=netdev@oss.sgi.com \
/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.