[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
"set -e" in subshell is now reliable
From: |
Pavel Roskin |
Subject: |
"set -e" in subshell is now reliable |
Date: |
Thu, 22 Feb 2001 00:28:21 -0500 (EST) |
Hello, Akim!
You recently applied a patch to tests/target-cflags.test without
mentioning it in ChangeLog. Maybe you didn't mean to commit that change?
If you did, then two small fixes are needed:
1) You should run ./foo instead /foo
2) bash could not detect it because "set -e" doesn't propagate to the
subshell. I only could catch it on FreeBSD 4.0.
I think it's better to stay on the safe side and eliminate the subshell. I
tried "set -e" in subshell but it didn't work as it should (with
bash-1.14.7).
ChangeLog:
* tests/target-cflags.test: Don't use subshell to configure in
subdirectory. Typo fix - run `./foo', not `/foo'.
_____________________________
--- tests/target-cflags.test
+++ tests/target-cflags.test
@@ -52,13 +52,14 @@
$AUTOCONF
$AUTOMAKE -a
mkdir obj
-(
- cd obj
- ../configure
- $MAKE
- /foo
- ./bar
-)
+
+cd obj
+../configure
+$MAKE
+./foo
+./bar
+cd ..
+
./configure
$MAKE
./foo
_____________________________
Regards,
Pavel Roskin
- "set -e" in subshell is now reliable,
Pavel Roskin <=