From owner-freebsd-current Thu Sep 10 17:36:26 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA07085 for freebsd-current-outgoing; Thu, 10 Sep 1998 17:36:26 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from gatekeeper.tsc.tdk.com (gatekeeper.tsc.tdk.com [207.113.159.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA07041 for ; Thu, 10 Sep 1998 17:36:18 -0700 (PDT) (envelope-from gdonl@tsc.tdk.com) Received: from sunrise.gv.tsc.tdk.com (root@sunrise.gv.tsc.tdk.com [192.168.241.191]) by gatekeeper.tsc.tdk.com (8.8.8/8.8.8) with ESMTP id RAA08813; Thu, 10 Sep 1998 17:35:47 -0700 (PDT) (envelope-from gdonl@tsc.tdk.com) Received: from salsa.gv.tsc.tdk.com (salsa.gv.tsc.tdk.com [192.168.241.194]) by sunrise.gv.tsc.tdk.com (8.8.5/8.8.5) with ESMTP id RAA10979; Thu, 10 Sep 1998 17:35:45 -0700 (PDT) Received: (from gdonl@localhost) by salsa.gv.tsc.tdk.com (8.8.5/8.8.5) id RAA18552; Thu, 10 Sep 1998 17:35:44 -0700 (PDT) From: Don Lewis Message-Id: <199809110035.RAA18552@salsa.gv.tsc.tdk.com> Date: Thu, 10 Sep 1998 17:35:43 -0700 In-Reply-To: HighWind Software Information "Re: Thread Problems" (Sep 10, 1:37pm) X-Mailer: Mail User's Shell (7.2.6 alpha(3) 7/19/95) To: HighWind Software Information , eischen@vigrid.com Subject: Re: Thread Problems Cc: freebsd-current@FreeBSD.ORG, tlambert@primenet.com Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sep 10, 1:37pm, HighWind Software Information wrote: } Subject: Re: Thread Problems } > A simple solution that you can make in your application, is to close } > all relevent sockets after the fork and before the execl. } } Seems to me that this is the only really workable solution. } } Is there a way to get "the highest numbered socket in use"? } That would make the task easy. Just loop 0 to that number and test } against the few sockets you need open. Would close-on-exec also work? If so you just need to fcntl(fd, F_SETFD, 1) whenever you create a new socket fd. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message