All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rick Jones <rick.jones2@hp.com>
To: Brent Casavant <bcasavan@sgi.com>
Cc: netdev@vger.kernel.org, David Miller <davem@davemloft.net>,
	linux-kernel@vger.kernel.org
Subject: Re: AF_UNIX MSG_PEEK bug?
Date: Tue, 08 Jan 2008 14:40:22 -0800	[thread overview]
Message-ID: <4783FBD6.1000004@hp.com> (raw)
In-Reply-To: <alpine.BSF.1.00.0801081556580.24286@pkunk.americas.sgi.com>

Potential bugs notwithstanding, given that this is a STREAM socket, and 
as such shouldn't (I hope, or I'm eating toes for dinner again) have 
side effects like tossing the rest of a datagram, why are you using 
MSG_PEEK?  Why not simply read the N bytes of the message that will have 
the message length with a normal read/recv, and then read that many 
bytes in the next call?

rick jones

  reply	other threads:[~2008-01-08 22:40 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-08 22:27 AF_UNIX MSG_PEEK bug? Brent Casavant
2008-01-08 22:40 ` Rick Jones [this message]
2008-01-08 22:53   ` Tom Spink
2008-01-08 23:18     ` Brent Casavant
2008-01-08 23:39       ` Tom Spink
2008-01-08 23:46         ` Tom Spink
2008-01-09  0:08           ` Brent Casavant
2008-01-08 23:20   ` Brent Casavant
2008-01-09 11:04 ` Tetsuo Handa
2008-01-09 18:01   ` Brent Casavant
2008-01-10  0:01     ` Herbert Xu
2008-01-10  1:19       ` Brent Casavant
2008-01-10  2:50       ` Brent Casavant
2008-01-10  3:05         ` Stephen Hemminger
2008-01-10 22:35         ` Brent Casavant
2008-01-10 22:36           ` Alan Cox

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=4783FBD6.1000004@hp.com \
    --to=rick.jones2@hp.com \
    --cc=bcasavan@sgi.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --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.