This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: different behaviour of bash and sh


> 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).

You're reporting a bug in the cygwin sh, not bash.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    chet@po.CWRU.Edu    http://cnswww.cns.cwru.edu/~chet/

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]