Date: Sat, 31 Oct 1998 00:24:35 -0500 (EST) From: Alfred Perlstein <bright@hotjobs.com> To: Satish Basvapatri <satishb@hotmail.com> Cc: freebsd-hackers@freefall.cdrom.com Subject: Re: Hi Message-ID: <Pine.BSF.4.05.9810310018100.9417-100000@porkfriedrice.ny.genx.net> In-Reply-To: <19981031051258.24809.qmail@hotmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
a) don't write buggy code :) b) setup a signal handler,(i assume for SIGSEGV) keep track of all sockets and close them in the handler c) the client+servers could then catch the SIGPIPE on writes to themain server as an indication to try to reconnect in "X" amount of time, if the slave servers are performing reads, you should set them up to timeout after some time if no data comes across and take it as a signal to reconnect. i think "a" is the best option though... :) Alfred Perlstein - Programmer, HotJobs Inc. - www.hotjobs.com -- There are operating systems, and then there's FreeBSD. -- http://www.freebsd.org/ 3.0-current On Sat, 31 Oct 1998, Satish Basvapatri wrote: > Hi, > > I have one problem with sockets. > > I have one server and many clients. Server listens at a particular port. > The clients themselves acts as servers for other clients and the opeen > the connection and never closes them. If the server crashes without > closing the socket when I am trying to restart the server I am getting > error message "port in user". Can you suggest is there any way to clear > up this port? > > Thanks > Satish Basvapatri > > ______________________________________________________ > Get Your Private, Free Email at http://www.hotmail.com > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.05.9810310018100.9417-100000>