Re: regression script/makefile exit failure

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: regression script/makefile exit failure
Date: 2004-12-11 20:15:19
Message-ID: 200412112115.19424.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

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/

In response to

Responses

Browse pgsql-hackers by date

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

Browse pgsql-patches by date

  From Date Subject
Next Message Peter Eisentraut 2004-12-11 20:18:58 Re: Updated Turkish translations for PostgreSQL 8.0
Previous Message Peter Eisentraut 2004-12-11 20:09:37 Re: Translation updates: 8.0: pg_dump-ru, initdb-ru, psql-ru; 7.4/8.0: postgres-ru