Re: initdb crash

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: <nitrogenycs(at)web(dot)de>, <pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Re: initdb crash
Date: 2004-07-04 11:49:25
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCE1716C3@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers-win32

>>
>> This is just a guess, but check that the new user (postgres)
>has enough
>> permission on the folders that you are using for Postgresql.
>Since you
>> created the folders as an admin user, ordinary users may not have all
>> the required permissions.
>>
>> System error 5 under windows is a "permission denied" error. I don't
>> know if Postgresql is reflecting that as a signal with the
>same number.
>>
>
>After i read your mail (thank you very much for it) i've set the
>file/folder permission for the c:\postgres folder so that the user
>postgres has full access to it just like every admin has (was
>a bit of a
>hassle cause u have to reboot into safe mode, but i got it).
>Unfortunately
>initdb still crashes in the same way. Then i tried to create
>the postgres
>folder in the home directory of the user which resulted in a
>crash too. Is
>c:\postgres the only folder i have to grant full permissions
>for or are
>there others, too (like some system stuff or sth)? Or is this rather a
>result from the fact that error 5 isn't a permission denied error?

It will require READ permissions on the system directories, as well as
all the subdirs of the install directory (including bin, lib etc).

It *will* say signalled by code 5 when it is actually exiting with
normal exitcode 5.

This is because of the WIFSIGNALED() macro in port.h.

Seems to me these macros are completely wrong for win32. And they are
under a FIXME header - I guess that could be why. Since win32 doesn't
actually detect signals (it has no concept of it in this context),
shouldn't it be something along the line of:

#define WEXITSTATUS(w) (w & 0x7f)
#define WIFEXITED(w) (1)
#define WIFSIGNALED(w) (0)
#define WTERMSIG(w) (0)

Comments?

//Magnus

Responses

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Gary Doades 2004-07-04 12:21:27 Re: PgSQL not as Administrator - probs on w
Previous Message Gary Doades 2004-07-04 08:41:55 Re: initdb crash