Re: MSVC build failure not exiting with proper error ststus

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: MSVC build failure not exiting with proper error ststus
Date: 2007-05-23 02:56:59
Message-ID: 4653AD7B.8060509@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Magnus Hagander wrote:
> Andrew Dunstan wrote:
>
>> mastodon and skylark just failed at the make stage due to a thinko on my
>> part (now fixed). However, this is not correctly caught by the buildfarm
>> script, meaning that the process invoked at this stage ('build 2>&1') is
>> not exiting properly with a non-zero status on error. That needs to be
>> fixed.
>>
>
> I was just checking this, and I'm not sure what the problem is. I tried
> updating to the broken version of solution.pm (the one missing the
> quotes around --with-pgport), and it works for me. Insofar that I get
> errorlevel 255 set when exiting the process. Both if I run "perl
> mkvcbuild.pl" and if I run "build" (yes, also for build 2>&1).
>
> The error given is "Can't modify constant item in predecrement" and then
> a compile error.
>
> Am I testing the wrong thing? Could it be that the buildfarm script is
> somehow not picking up error code 255? (in all cases where it's errors
> from the vc++ tools, I think it's always errorcode 1 or 2)
>

The code executed is:

chdir "$pgsql/src/tools/msvc";
@makeout = `build 2>&1`;
chdir $branch_root;
my $status = $? >>8;

The perl docs say this about $?:

The status returned by the last pipe close, backtick (‘‘) com-
mand, successful call to wait() or waitpid(), or from the sys-
tem() operator. This is just the 16-bit status word returned
by the wait() system call (or else is made up to look like it).
Thus, the exit value of the subprocess is really ("$? >> 8"),
and "$? & 127" gives which signal, if any, the process died
from, and "$? & 128" reports whether there was a core dump.

cheers

andrew

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Shachar Shemesh 2007-05-23 04:19:58 Re: Re: [Oledb-dev] double precision error with pg linux server, but not with windows pg server
Previous Message Magnus Hagander 2007-05-23 02:17:41 Re: MSVC build failure not exiting with proper error ststus