*BSD News Article 19699


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!hp9000.csc.cuhk.hk!saimiri.primate.wisc.edu!sdd.hp.com!spool.mu.edu!howland.reston.ans.net!europa.eng.gtefsd.com!uunet!bloom-beacon.mit.edu!paperboy.osf.org!bruel
From: bruel@postman.gr.osf.org (Christian Bruel)
Newsgroups: comp.unix.bsd
Subject: question on sockets implementation
Date: 20 Aug 1993 15:53:11 GMT
Organization: OSF RI Grenoble
Lines: 22
Distribution: world
Message-ID: <252s17$e4f@paperboy.osf.org>
NNTP-Posting-Host: boa.gr.osf.org

Lets say that I do in my favorite shell PWD=`pwd`,

The shell created a pipe, 2 sockets are allocated.
pwd does a sosend
the shell blocks in soreceive, once its gets the datas from the socket,
it unblocks, returns the mbuf and blocks again.
the commands exits and closes the snd socket.

but the rcv socket still exits and the shell is still blocked on it.
(it should not, but I'm debugging)

my question is how does the shell end up its rcv connection, maybe the
commands set a flag when exiting in the rcv socket to tell it
not to wait anymore.
Or the command should check the queue of incomming connections when closing
its socket's file descripter, but it does not.

any ideas ?

-- 

							[ chris ]