Tom Lane said:
> Andrew Dunstan <andrew@dunslane.net> writes:
>> 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:
>
> This is distinctly less than credible. If it were true, we'd have been
> seeing regression failures on FreeBSD for years. The script has looked
> like that at least back to 7.1 ...
>
I think you possibly misunderstand. It's not that the trap handler doesn't
get called - it's that it doesn't get the correct $?. The only symptom of
incorrectness is that pg_regress would exit with a status of 0 rather than 2
or whatever it should be. DarcyB ran that test script for me yesterday on
his FreeBSD-6 box (buildfarm's herring) and it produced "status = 0" rather
than the expected "status = 9". I would not expect anyone to have noticed
this behaviour unless they were testing the exit status of "make check".
cheers
andrew