-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 7/14/15 8:22 AM, Chet Ramey wrote:
> On 7/14/15 2:33 AM, Mike Frysinger wrote:
> 
>> running it with set -x shows that it runs the xgcc & rm steps, but
>> that's
> it.
>> using strace shows xgcc and rm both exit(0), but for some reason
>> bash doe
> s
>> not continue to the following commands like it should.
> 
>> if i change the && to a ; after the first rm, it still stops
>> executing at
> that
>> point.  if i change the && to a ; after the xgcc command, then the
>> rest o
> f the
>> commands run fine.
> 
>> attached is the strace.  it is not in fork mode, yet the shell
>> clearly do
> es an
>> exec into the rm tool.  looks like bash, for some reason, thinks
>> this is
> the
>> end of the possible commands and so does an optimization to exec
>> into it
> ?
> 
> Thanks for the report.  That's probably it; I'll take a look.

The following patch removes the code that incorrectly optimizes the fork in
this case.  There is a much more direct way to do what I want; that will be
in the next test release.

Chet

- -- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    c...@case.edu    http://cnswww.cns.cwru.edu/~chet/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iEYEARECAAYFAlWlC+EACgkQu1hp8GTqdKs+AACgn5NRCw3Hi0oO0ruPrX5F5ijU
nGAAoIV75OFY0KOM/UDLARkV2Q7cyEWd
=QvLq
-----END PGP SIGNATURE-----
*** ../bash-4.4-alpha/execute_cmd.c	2015-06-12 17:29:18.000000000 -0400
--- execute_cmd.c	2015-07-14 08:59:22.000000000 -0400
***************
*** 2630,2638 ****
  	  if (ignore_return && second)
  	    second->flags |= CMD_IGNORE_RETURN;
- 	  if (should_suppress_fork (second))
- 	    {
- 	      second->flags |= CMD_NO_FORK;
- 	      second->value.Simple->flags |= CMD_NO_FORK;
- 	    }
  
  	  exec_result = execute_command (second);
--- 2630,2633 ----

Reply via email to