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, &quot;David Holland&quot; &lt;<a href=3D"mailto:d=
 holland-bugs%netbsd.org@localhost">dholland-bugs%netbsd.org@localhost</a>&gt; 
wrote:<br>
 &gt;<br>
 &gt; The following reply was made to PR bin/45875; it has been noted by GNA=
 TS.<br>
 &gt;<br>
 &gt; From: David Holland &lt;<a 
href=3D"mailto:dholland-bugs%netbsd.org@localhost";>dh=
 olland-bugs%netbsd.org@localhost</a>&gt;<br>
 &gt; To: gnats-bugs%NetBSD.org@localhost<br>
 &gt; Cc:<br>
 &gt; Subject: Re: bin/45875: usr.bin/make: make -B not using a shell for ev=
 ery<br>
 &gt; =A0command<br>
 &gt; Date: Fri, 27 Jan 2012 16:22:38 +0000<br>
 &gt;<br>
 &gt; =A0On Thu, Jan 26, 2012 at 11:35:02PM +0000, Marko Sch?tz Schmuck wrot=
 e:<br>
 &gt; =A0&gt; =A0&gt; =A0That&#39;s in a separate invocation, as advertised.=
  What are you<br>
 &gt; =A0&gt; =A0&gt; =A0complaining about? That it skips going through the =
 shell for simple<br>
 &gt; =A0&gt; =A0&gt; =A0commands?<br>
 &gt; =A0&gt;<br>
 &gt; =A0&gt; =A0Yes, that&#39;s what I am complaining about. It says that i=
 t executes a<br>
 &gt; =A0&gt; =A0&quot;single shell per command&quot;. Also there is the tar=
 get .SINGLESHELL (not<br>
 &gt; =A0&gt; =A0documented in the man page) that sets compatMake to true. T=
 he change I<br>
 &gt; =A0&gt; =A0propose would also make that work.<br>
 &gt;<br>
 &gt; =A0That&#39;s a feature, not a bug. If you find a case where it fails,=
  that<br>
 &gt; =A0is, where make thinks it knows how to execute some piece of shell<b=
 r>
 &gt; =A0syntax itself but gets it wrong, please file a bug report. The<br>
 &gt; =A0behavior as it is should be completely equivalent, except faster.<b=
 r>
 &gt;</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>
 &gt; =A0The important thing about how many shells it invokes is the scope o=
 f<br>
 &gt; =A0shell actions like &quot;cd&quot;.<br>
 &gt;<br>
 &gt; =A0--<br>
 &gt; =A0David A. Holland<br>
 &gt; =A0<a 
href=3D"mailto:dholland%netbsd.org@localhost";>dholland%netbsd.org@localhost</a><br>
 &gt;<br>
 </p>
 
 --e89a8f234bfb632ed004b78bec94--
 


Home | Main Index | Thread Index | Old Index