Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Nov 1997 03:30:33 -0800
From:      Don Lewis <Don.Lewis@tsc.tdk.com>
To:        John-Mark Gurney <gurney_j@resnet.uoregon.edu>, Terry Lambert <tlambert@primenet.com>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: portal pid not correct...
Message-ID:  <199711041130.DAA12521@salsa.gv.tsc.tdk.com>
In-Reply-To: John-Mark Gurney <gurney_j@efn.org> "Re: portal pid not correct..." (Nov  4,  1:16am)

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199711041130.DAA12521>