From owner-freebsd-hackers Tue Nov 4 03:30:47 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id DAA05351 for hackers-outgoing; Tue, 4 Nov 1997 03:30:47 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from gatekeeper.tsc.tdk.com (root@gatekeeper.tsc.tdk.com [207.113.159.21]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id DAA05340 for ; Tue, 4 Nov 1997 03:30:39 -0800 (PST) (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.4/8.8.4) with ESMTP id DAA21424; Tue, 4 Nov 1997 03:30:36 -0800 (PST) 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 DAA04480; Tue, 4 Nov 1997 03:30:34 -0800 (PST) Received: (from gdonl@localhost) by salsa.gv.tsc.tdk.com (8.8.5/8.8.5) id DAA12521; Tue, 4 Nov 1997 03:30:33 -0800 (PST) From: Don Lewis Message-Id: <199711041130.DAA12521@salsa.gv.tsc.tdk.com> Date: Tue, 4 Nov 1997 03:30:33 -0800 In-Reply-To: John-Mark Gurney "Re: portal pid not correct..." (Nov 4, 1:16am) X-Mailer: Mail User's Shell (7.2.6 alpha(3) 7/19/95) To: John-Mark Gurney , Terry Lambert Subject: Re: portal pid not correct... Cc: freebsd-hackers@FreeBSD.ORG Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Nov 4, 1:16am, John-Mark Gurney wrote: } Subject: Re: portal pid not correct... } > > b) do something were it will fork off the child, child will } > > immediately SIGSTOP itself, then parent will mount, and then } > > parent will SIGCONT the process for normal execution, or kill } > > it off if the mount failed. } also, the pipe idea is a good one, but why would it be better than the } my signal routine? it sounds like more code as you have to do file } descriptor tracking... the signal way, you would only add about 5 lines } of code the the program (and then a few more as we can't use daemon } anymore :( )... There's a race condition in your signal algorithm. What happens if the parent runs first and sends the SIGCONT before the child manages to SIGSTOP itself? --- Truck