Path: utzoo!attcan!uunet!seismo!sundc!pitstop!sun!amdcad!ames!ll-xn!mit-eddie!husc6!linus!philabs!sbcs!bnlux0!drs From: drs@bnlux0.bnl.gov (David R. Stampf) Newsgroups: comp.protocols.tcp-ip Subject: Re: Shutting down sockets - HELP Message-ID: <619@bnlux0.bnl.gov> Date: 14 Sep 88 03:41:42 GMT References: <632@prlhp1.prl.philips.co.uk> Reply-To: drs@bnlux0.UUCP (David R. Stampf) Organization: Brookhaven National Lab., Upton, N.Y. Lines: 22 In article <632@prlhp1.prl.philips.co.uk> cattelld@prlhp1.UUCP () writes: > >HELP ! An apparent flaw in BSD sockets (on an Apollo >workstation) is giving me hassle! > >If I open a socket and bind an address to it and the program >subesequently crashes, how can I release that address from its >original use so I can reuse it on a subsequent invocation of >the same program ? Currently one crash precipitates another, >or at least prevents the program functioning. > I'm facing a similar problem currently on Vaxes and Suns, so I doubt that it is Apollo specific. A good approach (I think) is to have the O/S pick a port for you (bind with an address of INADDR_ANY), then rendez-vous at a well known port using a datagram approach to exchange the port to use and prevent tying up a port. Sorry this is vague - I'm home and doing this from a very tired memory. < dave stampf