Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Jul 1999 09:53:52 -0600
From:      Wes Peters <wes@softweyr.com>
To:        Ville-Pertti Keinonen <will@iki.fi>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: Documenting writev(2) ENOBUFS error
Message-ID:  <37A1CA90.79820BB2@softweyr.com>
References:  <19990728170119.A47890@kilt.nothing-going-on.org> <37A06B6B.B5BF74CF@softweyr.com> <86yafy5x55.fsf@not.demophon.com>

index | next in thread | previous in thread | raw e-mail

Ville-Pertti Keinonen wrote:
> 
> wes@softweyr.com (Wes Peters) writes:
> 
> >      [ENOBUFS]     Insufficient system buffer space exists to complete the op-
> >                    eration.
> 
> Do you know what kind of circumstances that error *really* occurs
> under?
> 
> If it happened with files, that would be a bug and should be fixed.
> The call is supposed to block to wait for writes to be possible.  This
> applies to stream sockets in most cases, as well.  Based on a quick
> look at the code, out-of-band TCP data seems to be the only case where
> ENOBUFS might be returned for streams, and that obviously doesn't
> apply to write/writev.

The only way writev can pick up an ENOBUFS error is in the call to
(*fp->f_ops->fo_write)(fp, &auio, fp->f_cred, 0) on line 447 (in -CURRENT).

ENOBUFS can happen on any network object if the system is completely out 
of mbufs, right?  So it could return ENOBUFS for any connected socket 
specified as the fd in a write or writev operation.

-- 
            "Where am I, and what am I doing in this handbasket?"

Wes Peters                                                         Softweyr LLC
http://softweyr.com/                                           wes@softweyr.com


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?37A1CA90.79820BB2>