bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Arm machine does not execute background statement correctly


From: Robert Elz
Subject: Re: Arm machine does not execute background statement correctly
Date: Thu, 01 Mar 2018 05:10:35 +0700

    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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]