Re: regression script/makefile exit failure - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: regression script/makefile exit failure
Date
Msg-id 200412112115.19424.peter_e@gmx.net
Whole thread Raw
In response to Re: regression script/makefile exit failure  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: regression script/makefile exit failure
List pgsql-hackers
Andrew Dunstan wrote:
> Further investigation has shown that the exit/trap idiom used in
> pg_regress.sh is less than 100% portable.
>
> The following shell script has been seen to produce incorrect output
> on both Cygwin and FreeBSD:
>
>
> #!/bin/sh
>
> trap '
>   st=$?
>   echo status = $st
>   exit $st
> ' 0
>
> (exit 9); exit

I seem to recall that there is a bug in the FreeBSD shell with line 
breaks in traps.  Try changing the above to

trap 'st=$?; echo status = $st; exit $st' 0

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: buildfarm build failure: icc7 + --enable-cassert
Next
From: Peter Eisentraut
Date:
Subject: Re: somebody working on: Prevent default re-use of sysids for dropped users and groups?