Path: csiph.com!weretis.net!feeder6.news.weretis.net!nntp.club.cc.cmu.edu!micro-heart-of-gold.mit.edu!bloom-beacon.mit.edu!bloom-beacon.mit.edu!171.64.64.130.MISMATCH!usenet.stanford.edu!not-for-mail From: Lakshman Garlapati Newsgroups: gnu.bash.bug Subject: Arm machine does not execute background statement correctly Date: Wed, 28 Feb 2018 16:01:28 +0530 Lines: 71 Approved: bug-bash@gnu.org Message-ID: NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: usenet.stanford.edu 1519829280 22656 208.118.235.17 (28 Feb 2018 14:48:00 GMT) X-Complaints-To: action@cs.stanford.edu To: bug-bash@gnu.org, chet.ramey@case.edu Envelope-to: bug-bash@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=7Ow8RsYUt0pnrA6pq7PgsgG+Yb0HmBFJ+VQrxlqqEgA=; b=TBPk2OrFcxbUzOd2tVev+NzWNKx7kfPT42b0Xs0a7uJCjHXLwef8hj2TCekw09rOqG C4EplZjaJcgux6SowoEMXmA4zB9Zqntd9Uiu7n5n8j6jJjmm7tRCu05HNBzhWH4X/Ses muIPr/EQwvEHP1+w7hWZRPYuGYDEvVUVp9BFkeldCk575pq9JhHSDfpThB53amyMEJcD 1ZV4D29rza9IjypUL9ZlMsDj9ZIUqRoQ5tRaBelJ+X2gzbh1JAM+Z7NRD/EpxTN/Vq2K Qj/I5iPMgTVDx9ZYjy37B1VdiocE+8OE+B5dEuKMYTGb0ZIYWGfnwz/zFFgXqAwQFMdh eV9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=7Ow8RsYUt0pnrA6pq7PgsgG+Yb0HmBFJ+VQrxlqqEgA=; b=RCGBUS8BVZCCjfQYE+fPaF9M1AKTR3p8yE6DwL2UmLcWyWPwjJeAo2IZtc2lfrJK1i WOKrkAmCKSwtWEpMOrWj7DKSjB39qdJoONAMx5sLaEkhZvUtzmFXDPYQkBFtDlZ2ih1f Jln0N264ciT925SHWBPZ6YuRe8hWLweb3rIUyPdkRB7bOkozHnO0JxDVG7fBAbINqeM2 vwOzdZMZiEUxF8Dbd6cEY5J2W2BsRV0fBQIhNqVxmnNh7C16wKHtRTtg3zYTKDYvQsam CXBg59wXOdubbCRl/bWYHFqDANnJ6We1ZacwnO/gWqKrfOAZb8Qiytc7v4cpAg14zQGE zC9w== X-Gm-Message-State: APf1xPC9d/85l9D6apI6pexcMFn2FLAaGQkFO3mGd3tZ5K6tTxdIya1E BEvbA/BE4NKoNntnJf43vlDNIs6QGVVJXPT18N1sIw== X-Google-Smtp-Source: AH8x227eRuNL8gaSD0SjbedRlyt+5/fsHPxGmITWzsXna+/uAgjBUprthKGQEWvhUv68CBLOK7unH2ovdoQ9+WJ9RyI= X-Received: by 10.28.126.65 with SMTP id z62mr2727082wmc.1.1519813888652; Wed, 28 Feb 2018 02:31:28 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::22c X-Mailman-Approved-At: Wed, 28 Feb 2018 09:47:57 -0500 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com gnu.bash.bug:13767 Hi all, I am facing problem in bash 4.4 . In a function if first line is =E2=80=98I= f condition=E2=80=98 and the function is called in background then the bash d= oes not evaluate it properly Following are the cross compiled machine details. MACHINE=3D"arm" OS=3D"linux-gnueabi" CC=3D"arm-cortex_a9_v004-linux-gnueabi-gcc" CFLAGS=3D" -DPROGRAM=3D'bash' -DCONF_HOSTTYPE=3D'arm' -DCONF_OSTYPE=3D'linux-gnueabi' -DCONF_MACHTYPE=3D'arm-cortex_a9_v004-linux-gnuea bi' -DCONF_VENDOR=3D'cortex_a9_v004' -DLOCALEDIR=3D'/usr/local/share/locale= ' -DPACKAGE=3D'bash' -DSHELL -DHAVE_CONFIG_H -I. -I. -I./include -I./lib -O2 -Wno-parentheses -Wno-format-security" RELEASE=3D"4.4" PATCHLEVEL=3D"19" RELSTATUS=3D"release" MACHTYPE=3D"arm-cortex_a9_v004-linux-gnueabi" file bash =3D=3D=3D=3D=3D=3D=3D=3D=3D bash: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 3.4.0, not stripped bash --version =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D GNU bash, version 4.4.19(1)-release (arm-cortex_a9_v004-linux-gnueabi) Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software; you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law The following snippet is working fine in x86 processor machine not working in arm processor machine from bash 4.3 version onwards. test.sh =3D=3D=3D=3D=3D #!/bin/bash rm out.txt function abc() { if [ 2 -eq 1 ]; then echo "TRUE" else echo "FALSE" fi } abc & bash -x test.sh =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + 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. --=20 Lakshman