Skip site navigation (1) Skip section navigation (2)

Bad bug in fopen() wrapper code

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: <pgsql-patches(at)postgresql(dot)org>
Subject: Bad bug in fopen() wrapper code
Date: 2006-09-24 14:39:22
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-patches
There is a small bug in the fopen() wrapper code that was applied a
couple of weeks back for win32. It sets the wrong flags for files opened
in "append" mode. This makes the logfile writing not work - syslog.c
opens the logfile in append mode, but if the file does not already
exist, it will not be opened and an error is returned - causing the
postmaster to terminate.

This is pretty bad and pretty urgent - with this, systems installed by
the MSI installer simply *do not start*, because they are by default
configured to write logs to a file...

Attached patch sets the  O_CREAT option when appending to files.

//Ma <<open.diff>> gnus

Attachment: open.diff
Description: application/octet-stream (763 bytes)


pgsql-hackers by date

Next:From: Magnus HaganderDate: 2006-09-24 15:14:22
Subject: pg_regress starting postmaster
Previous:From: Magnus HaganderDate: 2006-09-24 14:34:43
Subject: Logfile created when not needed?

pgsql-patches by date

Next:From: Magnus HaganderDate: 2006-09-24 15:28:37
Subject: pg_ctl error msg on Windows 2000
Previous:From: Tom LaneDate: 2006-09-22 16:21:16
Subject: Re: Timezone doc patch

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group