Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #13778

Re: Arm machine does not execute background statement correctly

From Robert Elz <kre@munnari.OZ.AU>
Newsgroups gnu.bash.bug
Subject Re: Arm machine does not execute background statement correctly
Date 2018-03-01 05:10 +0700
Message-ID <mailman.9912.1519855921.27995.bug-bash@gnu.org> (permalink)
References <46653602-7efa-9e3c-b477-4d22118fd22a@case.edu> <CAAXuWg7NkCLUmxjn7odVG7ERmqSF-x9vTh0Vc-pYH53S0LgUHA@mail.gmail.com>

Show all headers | View raw


    Date:        Wed, 28 Feb 2018 09:03:45 -0500
    From:        Chet Ramey <chet.ramey@case.edu>
    Message-ID:  <46653602-7efa-9e3c-b477-4d22118fd22a@case.edu>

I didn't see the proginal of this message either, but ...

  | On 2/28/18 5:31 AM, Lakshman Garlapati wrote:
  |
  | > The following snippet is working fine in x86 processor machine not working
  | > in arm processor machine from bash 4.3 version onwards.
  | > 
  | > test.sh
  | > =====
  | > #!/bin/bash
  | > rm out.txt
  | > function abc() {
  | >     if [ 2 -eq 1 ]; then
  | >        echo "TRUE"
  | >    else
  | >        echo "FALSE"
  | >    fi
  | > }
  | > abc &
  | > 
  | > bash -x test.sh
  | > ===========
  | > + rm -f out.txt
  | > + abc
  | > + '[' 2 -eq 1 ']'
  | > + echo TRUE    <---- Here we are expecting FALSE
  | > TRUE
  | > 
  | > please provide some guidance on how to resolve the problem, let me know if
  | > problem statement is not clear.

It appears as if something odd is up there, the "rm out.txt" has been executed 
as "rm -f out.txt" so either there are aliases involved somewhere, in which case
there is a $ENV type script with unknown contents, or the script that is
being tested isn't the script shown.

In either case, whatever happened needs to be discovered and understood
before looking for other possible bugs.

kre

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

Re: Arm machine does not execute background statement correctly Robert Elz <kre@munnari.OZ.AU> - 2018-03-01 05:10 +0700

csiph-web