This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
different behaviour of bash and sh
- To: bug-bash at gnu dot org, cygwin at cygwin dot com
- Subject: different behaviour of bash and sh
- From: Ralf Fassel <ralf at akutech dot de>
- Date: Thu, 8 Mar 2001 21:16:48 +0100
- Organization: Akustik Technologie Goettingen (ATG)
Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: cygwin
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash.exe' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='cygwin' -DCONF_MACHTYPE='i686-pc-cygwin' -DCONF_VENDOR='pc' -DSHELL -DHAVE_CONFIG_H -I. -I../src -I../src/include -I../src/lib -I/src/bash/distro/usr/include -g -O2
uname output: CYGWIN_NT-4.0 MARS 1.1.8(0.34/3/2) 2001-01-31 10:08 i686 unknown
Machine Type: i686-pc-cygwin
Bash Version: 2.04
Patch Level: 7
Release Status: release
Description:
The following script behaves differently in bash and sh:
% cat script
#!/bin/sh --
checkstat() {
echo $?
}
false
checkstat
# End of file
Repeat-By:
$ type bash
bash is /usr/bin/bash
$ bash script
1
$ type sh
sh is /usr/bin/sh
$ sh script
0
The 0 is wrong IMHO, it should be 1. (Even HP with their BD-/bin/sh
returns 1).
R'
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple