Re: [HACKERS] Win32 WEXITSTATUS too - Mailing list pgsql-patches

From Tom Lane
Subject Re: [HACKERS] Win32 WEXITSTATUS too
Date
Msg-id 18995.1169566272@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Win32 WEXITSTATUS too  (Bruce Momjian <bruce@momjian.us>)
Responses Re: [HACKERS] Win32 WEXITSTATUS too  (Bruce Momjian <bruce@momjian.us>)
List pgsql-patches
Bruce Momjian <bruce@momjian.us> writes:
> Magnus Hagander wrote:
>> Now, if we're only caring about exit() from *postgresqls own processes*,
>> that might hold true. In which case I withdraw that objection as long as
>> the comment i updated to reflect this ;-) But if we're talking about
>> exit() in general of any process, then it's simply wrong.

> Right, that code is only used by the backend and tools.

We can reasonably assume that no Postgres code will exit() with a value
bigger than 255, because to do so would be unportable.

I'm more concerned about the other direction: can we be sure that a
status value less than 255 is from exit() rather than something that
should be called an exception?

And to get back to the point, surely all this confusion proves the point
about how the error message should NOT try to tell people how to
interpret the number.

            regards, tom lane

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Win32 WEXITSTATUS too
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Win32 WEXITSTATUS too