Re: Win32 rename()/unlink() questions
От
Stephan Szabo
Тема
Re: Win32 rename()/unlink() questions
Дата
Msg-id
20020919230827.A36505-100000@megazone23.bigpanda.com
Ответ на
Re: Win32 rename()/unlink() questions (Mike Mascari)
Список
Дерево обсуждения
Re: Win32 rename()/unlink() questions Mike Mascari <mascarm@mascari.com>
Re: Win32 rename()/unlink() questions Bruce Momjian <pgman@candle.pha.pa.us>
Re: Win32 rename()/unlink() questions Bruce Momjian <pgman@candle.pha.pa.us>
On Fri, 20 Sep 2002, Mike Mascari wrote:
> Stephan Szabo wrote:
> > On Fri, 20 Sep 2002, Mike Mascari wrote:
> >>So far, MoveFileEx("foo", "bar", MOVEFILE_REPLACE_EXISTING)
> >>returns "Access Denied" when Process 1 attempts the rename. But
> >>I'm continuing to investigate the possibilities...
> >
> >
> > Does a sequence like
> > Process 1 opens "foo"
> > Process 2 opens "foo"
> > Process 1 creates "bar"
> > Process 1 renames "foo" to
> > - where something is generated to not overlap an existing file
> > Process 1 renames "bar" to "foo"
> > Process 2 continues reading
> > let you do the replace and keep reading (at the penalty that
> > you've now got to have a way to know when to remove the
> > various s)
>
> Yes! Indeed that does work.
Thinking back, I think that may still fail on Win95 (using MoveFile).
Once in the past I had to work on (un)installers for Win* and I
vaguely remember Win95 being more strict than Win98 but that may just
have been with moving the executable you're currently running.
В списке pgsql-hackers по дате отправления