Hi,
>From socket(7):
SO_LINGER
...
When enabled, a close(2) or shutdown(2) will not
return until all queued messages for the socket
have been successfully sent or the linger timeout
has been reached.
I'm not seeing shutdown(2) block on a TCP socket. This is Linux kernel
2.2.16 (RH7.0). Is this a kernel bug, a documentation bug, or does it all
work fine and it's a Chris bug?
Cheers
Chris
Hello!
> I'm not seeing shutdown(2) block on a TCP socket. This is Linux kernel
> 2.2.16 (RH7.0). Is this a kernel bug, a documentation bug,
Man page is wrong.
What's about kernel... Hmm, actually, it is worth to test genuine bsd.
Such feature could be useful.
Alexey
[cc: Andi]
On Sun, 11 Feb 2001 [email protected] wrote:
> Hello!
>
> > I'm not seeing shutdown(2) block on a TCP socket. This is Linux kernel
> > 2.2.16 (RH7.0). Is this a kernel bug, a documentation bug,
>
> Man page is wrong.
Yes, man socket(7) seems to be wrong.
I don't have access to a genuine BSD at the moment, but from man pages:
- HP/UX specifically states that SO_LINGER has no effect on shutdown()
- Solaris SO_LINGER only mentions that close() is affected.
- Likewise FreeBSD
Cheers
Chris
On Sun, Feb 11, 2001 at 08:41:04PM +0000, Chris Evans wrote:
>
> [cc: Andi]
Missing context..
>
> On Sun, 11 Feb 2001 [email protected] wrote:
>
> > Hello!
> >
> > > I'm not seeing shutdown(2) block on a TCP socket. This is Linux kernel
> > > 2.2.16 (RH7.0). Is this a kernel bug, a documentation bug,
> >
> > Man page is wrong.
>
> Yes, man socket(7) seems to be wrong.
What do you exactly think is wrong?
-Andi
On Sun, 11 Feb 2001, Andi Kleen wrote:
> On Sun, Feb 11, 2001 at 08:41:04PM +0000, Chris Evans wrote:
> >
> > [cc: Andi]
>
> Missing context..
[...]
> What do you exactly think is wrong?
man socket(7) says that setting SO_LINGER on a socket will make shutdown()
and close() block. That's incorrect; only close() blocks.
Sorry for the missing context.
Cheers
Chris
On Sun, Feb 11, 2001 at 09:05:07PM +0000, Chris Evans wrote:
>
> On Sun, 11 Feb 2001, Andi Kleen wrote:
>
> > On Sun, Feb 11, 2001 at 08:41:04PM +0000, Chris Evans wrote:
> > >
> > > [cc: Andi]
> >
> > Missing context..
>
> [...]
>
> > What do you exactly think is wrong?
>
> man socket(7) says that setting SO_LINGER on a socket will make shutdown()
> and close() block. That's incorrect; only close() blocks.
Ok, fixed. Thanks.
-Andi