Boost logo

Boost :

From: Craig Henderson (cdm.henderson_at_[hidden])
Date: 2003-08-11 03:03:03


"Pavel Vozenilek" <pavel_vozenilek_at_[hidden]> wrote in message
news:Sea2-DAV68Aww8S5xFy00017c60_at_hotmail.com...
> From: "David Abrahams" <dave_at_[hidden]>
> > I need the ability to do interprocess synchronization through file
> > locking, c.f. Java.File.createNewFile and Java.File.deleteOnExit:
> ...
> > On Posix, the first one would be done with
> > open(..., O_CREAT | O_EXCL)
> >
> > and the second, I suppose, would be done with a terminate handler.
> >
>
> The second feature (delete-on-exit) is supported by OS:
> - on Win32 using FILE_FLAG_DELETE_ON_CLOSE flag in CreateFile()
> - on Unix using unlink() standard system call

FILE_FLAG_DELETE_ON_CLOSE deletes the file when the last handle is closed,
not when the process is terminated. It is therefore similar, but not quite
the same.

-- Craig


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk