tech-net archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: so_rerror
Date: Tue, 6 Nov 2018 00:59:04 +0000
From: Roy Marples <roy%marples.name@localhost>
Message-ID: <037baf11-a2d2-82f8-aa96-30472dccd134%marples.name@localhost>
| I'm not sure how much more non intrusive it can be - everything I've
| done is standards compliant, documented by POSIX and implemented
| previously in at least one other OS.
ENOBUFS in POSIX (for these operations, which includes read() incidentally)
is specified as:
[ENOBUFS] Insufficient resources were available in the system to perform the operation.
Note the "to perform the operation" - ie: the recvfrom() (which I cut&pasted
this from, though it is identical in all of them). That is, it indicates
that the system needed to obtain some resource (stream buffers I would
guess, to copy the message into) which were unavailable at the time,
and which suggests that if tried again later, resources might be available,
and the message which could not be received then might be available
now. It also suggests that if select()/poll() indicated that a re*() could be
done, it will continue indicating that after, as the message will still be
there.
While you're probably correct that apps might want to understand this
error code, just in case, I'd suspect that ever since streams went the
way of the dodo, that no-one generates his error for this purpose.
Abusing the error code for some different purpose (a packet already
lost because there was no space to put it - regardless of whether the
source was this host or some other) just because it is in the list of
potentially generated errors, is not correct.
If it were me, I'd rip all support for this out of the kernel completely
(I am that much of a purist) - even though I can see that something
like it is useful for the routing socket (which is only a socket really
as it was the easy way to implement) - but I think I'd have used EIO
instead of ENOBUFS (a genuine I/O error on the routing socket
should never happen.)
kre
Home |
Main Index |
Thread Index |
Old Index