Date: Thu, 1 Aug 2002 15:10:39 -0300 (BRT) From: Joao Carlos Mendes Luis <jonny@jonny.eng.br> To: FreeBSD-gnats-submit@FreeBSD.org Subject: bin/41240: /bin/sh builtins redirection failures abort entire script Message-ID: <20020801181039.374A0D9233@coe.ufrj.br>
next in thread | raw e-mail | index | archive | help
>Number: 41240
>Category: bin
>Synopsis: /bin/sh builtins redirection failures abort entire script
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Aug 01 11:20:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Joao Carlos Mendes Luis
>Release: FreeBSD 4.6-STABLE i386
>Organization:
COPPE/UFRJ
>Environment:
System: FreeBSD roma.coe.ufrj.br 4.6-STABLE FreeBSD 4.6-STABLE #0: Tue Jul 9 16:08:41 BRT 2002 jonny@roma.coe.ufrj.br:/usr/cvsup/RELENG_4/src/sys/compile/ROMA i386
4-stable from July, 29, 2002
>Description:
See example below
>How-To-Repeat:
This script fails with /bin/sh, works with bash
#! /bin/sh
TestFunc()
{
${ECHO} "no perm" > $file
# Builtin echo does not reach here
${ECHO} ok
${ECHO} "no perm" >> $file
${ECHO} ok
}
file=/tmp/xxx
touch $file
chmod 000 $file
ECHO=/bin/echo
TestFunc
ECHO=echo
TestFunc
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020801181039.374A0D9233>
