Re: regression script/makefile exit failure

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

Peter Eisentraut wrote:

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

Thankyou Peter! I'd never have guessed something so obscure!

I have confirmed that this is the problem, and ascertained that the
Cygwin shell exhibits the same behaviour.

I will submit a patch for pg_regress.sh shortly (after a little testing
using buildfarm).

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2004-12-11 21:33:53 Re: [HACKERS] regression script/makefile exit failure
Previous Message Peter Eisentraut 2004-12-11 20:20:58 Re: somebody working on: Prevent default re-use of sysids for dropped users and groups?

Browse pgsql-patches by date

  From Date Subject
Next Message Andrew Dunstan 2004-12-11 21:33:53 Re: [HACKERS] regression script/makefile exit failure
Previous Message Peter Eisentraut 2004-12-11 20:18:58 Re: Updated Turkish translations for PostgreSQL 8.0