From: | "Albe Laurenz" <all(at)adv(dot)magwien(dot)gv(dot)at> |
---|---|
To: | "Tom Lane *EXTERN*" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "George Pavlov" <gpavlov(at)mynewplace(dot)com> |
Cc: | <pgsql-general(at)postgresql(dot)org>, <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] query log corrupted-looking entries |
Date: | 2006-10-18 07:53:49 |
Message-ID: | 52EF20B2E3209443BC37736D00C3C1380AE75E5D@EXADV1.host.magwien.gv.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
Tom Lane wrote:
> I checked around with some kernel/glibc gurus in Red Hat, and the
> consensus seemed to be that we'd be better off to bypass fprintf() and
> just send message strings to stderr using write() --- ie, instead of
> elog.c doing
>
> fprintf(stderr, "%s", buf.data);
>
> do
>
> write(fileno(stderr), buf.data, strlen(buf.data));
>
> Anyone have any comments on possible portability risks? In
> particular, will this work on Windows?
The following program compiles and runs fine:
#include <stdio.h>
#include <unistd.h>
#include <string.h>
int main(int argc, char **argv) {
const char *s="Hello!\n";
write(fileno(stderr), s, strlen(s));
return 0;
}
Yours,
Laurenz Albe
From | Date | Subject | |
---|---|---|---|
Next Message | J S B | 2006-10-18 08:05:40 | Urgen help required |
Previous Message | dfx | 2006-10-18 07:47:56 | Cannot connect to Fedora Core 5 server from the network |
From | Date | Subject | |
---|---|---|---|
Next Message | Shane Ambler | 2006-10-18 08:22:35 | Re: 8.1.4 verified on Intel Mac OS 10.4.8 |
Previous Message | Mark Kirkwood | 2006-10-18 07:04:29 | Re: Asynchronous I/O Support |