Re: some questions about descriptors

From: Alan Cox (alan@lxorguk.ukuu.org.uk)
Date: Sun Jun 04 2000 - 11:58:09 EST


> So calling close() in one clone, won't cause the early return of,
> say, read() in another; the read has to complete before the
> descriptor gets closed proper. Is that right ?

There is no formal definition of 'right' in this context. Not that I am aware
of anyway. Unix defers close until the last user of a handle closes it, we
basically extended that interpretation. It makes for efficient code as we
don't keep having to check stuff.

With sockets a good tip is to do a shutdown() on the socket then close it,
that will cause an EOF to be seen

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Jun 07 2000 - 21:00:19 EST