cattelld@prlhp1.prl.philips.co.uk (cattelld) (09/12/88)
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 can't find any command which will do this, and I don't want to have to shut down the node repeatedly (particularly whilst debugging). Alternatively is it possible to force a binding of a socket to an apparently used address. Please post any replies to: cattelld@prl.philips.co.uk Many thanks, David Cattell.
drs@bnlux0.bnl.gov (David R. Stampf) (09/14/88)
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