From owner-freebsd-hackers Fri Oct 30 21:22:06 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id VAA13548 for freebsd-hackers-outgoing; Fri, 30 Oct 1998 21:22:06 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA13543 for ; Fri, 30 Oct 1998 21:22:05 -0800 (PST) (envelope-from bright@hotjobs.com) Received: from porkfriedrice.ny.genx.net (porkfriedrice.ny.genx.net [206.64.4.30]) by freefall.freebsd.org (8.8.8/8.8.5) with ESMTP id VAA19433 for ; Fri, 30 Oct 1998 21:22:06 -0800 (PST) Received: from localhost (bright@localhost) by porkfriedrice.ny.genx.net (8.9.1/8.9.1) with ESMTP id AAA09430; Sat, 31 Oct 1998 00:24:35 -0500 (EST) (envelope-from bright@hotjobs.com) X-Authentication-Warning: porkfriedrice.ny.genx.net: bright owned process doing -bs Date: Sat, 31 Oct 1998 00:24:35 -0500 (EST) From: Alfred Perlstein X-Sender: bright@porkfriedrice.ny.genx.net To: Satish Basvapatri cc: freebsd-hackers@freefall.cdrom.com Subject: Re: Hi In-Reply-To: <19981031051258.24809.qmail@hotmail.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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