On Tue, 2019-09-03 at 10:54 -0400, Dmitry Goncharov wrote:
> You were planning to use stat, right? Are you planning to stat the
> interperter specified in shebang as well?
> Some of the races can be avoided by opening the file before
> posix_spawn and then using fstat on the fd.
> Alternatively that posix_spawn check from configure.ac can be executed
> at runtime to support cross compilation.

I'm going to use a trivial best-effort approach, that should be
sufficient to allow the regression tests to pass.

I don't plan to care overly much about race conditions, weird
interpreter/shebang issues, etc.  If a simple attempt to detect and
emulate the old-school fork/exec behavior doesn't pan out, I'll just
show the failure as exit 127 like we do now.  I don't think it's
worthwhile to spend more effort on it than that, or to throw out
posix_spawn() completely simply because some error messages are not as
clear as they used to be--especially these type of errors which are due
to fundamental failures in the build environment (trying to invoke non-
executable files or non-existent files), not everyday things like
failing compilations or whatever.


_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make
  • gmake-4.2.90 ... Dmitry Goncharov via Bug reports and discussion for GNU make
    • Re: gmak... Paul Smith
      • Re: ... Dmitry Goncharov via Bug reports and discussion for GNU make
        • ... Paul Smith

Reply via email to