From owner-freebsd-hackers Fri Jun 20 00:21:45 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id AAA17546 for hackers-outgoing; Fri, 20 Jun 1997 00:21:45 -0700 (PDT) Received: from deathstar.ml.org (adrian@deathstar.ml.org [203.62.152.4]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id AAA17538 for ; Fri, 20 Jun 1997 00:21:31 -0700 (PDT) Received: from localhost (adrian@localhost) by deathstar.ml.org (8.8.5/8.7.3) with SMTP id PAA15724 for ; Fri, 20 Jun 1997 15:23:40 +0800 Date: Fri, 20 Jun 1997 15:23:40 +0800 (WST) From: Adrian Chadd To: freebsd-hackers@freebsd.org Subject: socket redirector Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hey guys. I'm writing a quick socket redirector for something. Its run out of inetd, and basically opens a socket somewhere and acts as a pipe between the two. I'm using select(), and its working fine. The only problem I'm having is that I don't know how to tell when the remote end closes the connection down, so that I can just close everything down, and quit. Any ideas on how I'd do this? Thanks, -- Adrian Chadd | "Unix doesn't stop you from doing | stupid things because that would | stop you from doing clever things"