NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bin/45875: usr.bin/make: make -B not using a shell for every command
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
>
--e89a8f234bfb632ed004b78bec94
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<p><br>
On Jan 27, 2012 12:25 PM, "David Holland" <<a href=3D"mailto:d=
holland-bugs%netbsd.org@localhost">dholland-bugs%netbsd.org@localhost</a>>
wrote:<br>
><br>
> The following reply was made to PR bin/45875; it has been noted by GNA=
TS.<br>
><br>
> From: David Holland <<a
href=3D"mailto:dholland-bugs%netbsd.org@localhost">dh=
olland-bugs%netbsd.org@localhost</a>><br>
> To: gnats-bugs%NetBSD.org@localhost<br>
> Cc:<br>
> Subject: Re: bin/45875: usr.bin/make: make -B not using a shell for ev=
ery<br>
> =A0command<br>
> Date: Fri, 27 Jan 2012 16:22:38 +0000<br>
><br>
> =A0On Thu, Jan 26, 2012 at 11:35:02PM +0000, Marko Sch?tz Schmuck wrot=
e:<br>
> =A0> =A0> =A0That's in a separate invocation, as advertised.=
What are you<br>
> =A0> =A0> =A0complaining about? That it skips going through the =
shell for simple<br>
> =A0> =A0> =A0commands?<br>
> =A0><br>
> =A0> =A0Yes, that's what I am complaining about. It says that i=
t executes a<br>
> =A0> =A0"single shell per command". Also there is the tar=
get .SINGLESHELL (not<br>
> =A0> =A0documented in the man page) that sets compatMake to true. T=
he change I<br>
> =A0> =A0propose would also make that work.<br>
><br>
> =A0That's a feature, not a bug. If you find a case where it fails,=
that<br>
> =A0is, where make thinks it knows how to execute some piece of shell<b=
r>
> =A0syntax itself but gets it wrong, please file a bug report. The<br>
> =A0behavior as it is should be completely equivalent, except faster.<b=
r>
></p>
<p>a.)=A0 The shell invocation is supposed to use .SHELL specification, whi=
ch of course allows the while command to be rewritten</p>
<p>b.) The shell invocation will be subject to various expansions (eg. alia=
s expansion)=A0 to which execve will not be subjected</p>
<p>So I think the assumption that <a href=3D"http://execve.is">execve.is</a=
> 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...</p>
<p>Best regards,</p>
<p>Marko <br>
> =A0The important thing about how many shells it invokes is the scope o=
f<br>
> =A0shell actions like "cd".<br>
><br>
> =A0--<br>
> =A0David A. Holland<br>
> =A0<a
href=3D"mailto:dholland%netbsd.org@localhost">dholland%netbsd.org@localhost</a><br>
><br>
</p>
--e89a8f234bfb632ed004b78bec94--
Home |
Main Index |
Thread Index |
Old Index