At Sat, 28 Jan 2012 00:50:04 +0000 (UTC), Marko Schütz-Schmuck wrote: > > The following reply was made to PR bin/45875; it has been noted by GNATS. > > From: =?ISO-8859-1?Q?Marko_Sch=FCtz=2DSchmuck?= > <markoschuetz%googlemail.com@localhost> > To: gnats-bugs%netbsd.org@localhost > Cc: netbsd-bugs%netbsd.org@localhost, MarkoSchuetz%web.de@localhost, > gnats-admin%netbsd.org@localhost > Subject: Re: bin/45875: usr.bin/make: make -B not using a shell for every > command > Date: Fri, 27 Jan 2012 20:45:01 -0400 > > --e89a8f234bfb632ed004b78bec94 > Content-Type: text/plain; charset=ISO-8859-1 > > On Jan 27, 2012 12:25 PM, "David Holland" > <dholland-bugs%netbsd.org@localhost> wrote: > > > > The following reply was made to PR bin/45875; it has been noted by GNATS. > > > > From: David Holland <dholland-bugs%netbsd.org@localhost> > > To: gnats-bugs%NetBSD.org@localhost > > Cc: > > Subject: Re: bin/45875: usr.bin/make: make -B not using a shell for every > > command > > Date: Fri, 27 Jan 2012 16:22:38 +0000 > > > > On Thu, Jan 26, 2012 at 11:35:02PM +0000, Marko Sch?tz Schmuck wrote: > > > > That's in a separate invocation, as advertised. What are you > > > > complaining about? That it skips going through the shell for simple > > > > commands? > > > > > > Yes, that's what I am complaining about. It says that it executes a > > > "single shell per command". Also there is the target .SINGLESHELL (not > > > documented in the man page) that sets compatMake to true. The change I > > > propose would also make that work. > > > > That's a feature, not a bug. If you find a case where it fails, that > > is, where make thinks it knows how to execute some piece of shell > > syntax itself but gets it wrong, please file a bug report. The > > behavior as it is should be completely equivalent, except faster. > > > > a.) The shell invocation is supposed to use .SHELL specification, which of > course allows the while command to be rewritten > > b.) The shell invocation will be subject to various expansions (eg. alias > expansion) to which execve will not be subjected > > So I think the assumption that execve.is just a faster version of executing > a command through the shell (even for well-behaved cases) is wrong. And > definitely when the user asks explicitly for individual shells... > > Best regards, > > Marko > > The important thing about how many shells it invokes is the scope of > > shell actions like "cd". > > > > -- > > David A. Holland > > dholland%netbsd.org@localhost It would also be more in line with POSIX: "The execution line shall then be executed by a shell as if it were passed as the argument to the system() interface, except that the shell -e option shall also be in effect. The environment for the command being executed shall contain all of the variables in the environment of make." Best regards, Marko
Attachment:
pgpnpU2XvncgY.pgp
Description: PGP signature