From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Hiroshi Saito <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] pg_regress breaks on msys |
Date: | 2006-07-28 19:25:06 |
Message-ID: | 200607281925.k6SJP6129731@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Tom Lane wrote:
> "Hiroshi Saito" <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp> writes:
> > This is very strange.!!
> > boolean ... ok
> > char ... diff command failed with status 1: "diff -w "./expected/char.out"
> > "./results/char.out" >"./results/char.diff""
> > server stopped
>
> Yes, I believe the problem is that our Windows versions of the
> WIFEXITED/WEXITSTATUS macros are wrong. pg_regress is trying to verify
> that the diff call didn't fail entirely (eg, diff not there or failed
> to read one of the files), but the status code diff is returning for
> "files not the same" is confusing it.
>
> Can anyone check into what the result status conventions really are on
> Windows? I am tempted to change the macros to just swap the bytes,
> but I dunno what that will do to their existing usages to check the
> result of pclose() or win32_waitpid().
I checked on MinGW and system() just returns the value returned by the
application. There isn't any special two-values-in-one layering like is
done on Unix for wait() and the return value from system(). It seems if
the child dies from a signal, the parent dies too, at least in my C
tests.
I propose the following patch which just makes Win32 behave as returning
a single value from system(), and cleans up pg_regress.c. We don't call
wait() or pipe() on Win32. Though this is clearly a bug fix, I am
hesitant to backpatch it to 8.1 or 8.0 because of no problem reports.
--
Bruce Momjian bruce(at)momjian(dot)us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Attachment | Content-Type | Size |
---|---|---|
/pgpatches/wait | text/x-diff | 1.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2006-07-28 19:25:53 | Re: On-disk bitmap index patch |
Previous Message | Luke Lonergan | 2006-07-28 19:17:53 | Re: On-disk bitmap index patch |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-07-28 19:29:47 | Re: [HACKERS] pg_regress breaks on msys |
Previous Message | Chris Browne | 2006-07-28 18:25:23 | Re: The vacuum-ignore-vacuum patch |