[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Problems with lposix on win32
- From: Edgar Toernig <froese@...>
- Date: Sun, 15 Jan 2006 15:59:31 +0100
D Burgess wrote:
>
> I understand, someone correct me if I am wrong that on
> Unix unlink will remove the file when the last user of it
> closes the file.
The name is removed immediately but the contents of the
file may stay and is removed only when the last user closes
the file.
The difference between unlink and remove is, that unlink won't
delete directories. remove does as long as the directory is
empty. On older system which lack remove you had to call rmdir
the delete directories.
> THis equals the FILEFLAG_DELETE_ON_CLOSE on windows.
Sure? Will this example work? It will give you ten
/different/ files:
int fd[10];
for (int i = 0; i < 10; i++) {
fd[i] = open("foo", O_CREAT|O_TRUNC|O_RDWR, 0666);
unlink("foo");
}
> On windows remove and unlink require exclusive access.
Posix allows this restriction (errno=EBUSY) but it's unusual
and most Unixes let you delete busy files/directories.
Ciao, ET.
- References:
- Problems with lposix on win32, Chris Marrin
- Re: Problems with lposix on win32, Wim Couwenberg
- Re: Problems with lposix on win32, Ryanne Thomas Dolan
- Re: Problems with lposix on win32, Wim Couwenberg
- Re: Problems with lposix on win32, Rici Lake
- Re: Problems with lposix on win32, D Burgess
- Re: Problems with lposix on win32, Chris Marrin
- Re: Problems with lposix on win32, D Burgess
- Re: Problems with lposix on win32, Chris Marrin
- Re: Problems with lposix on win32, D Burgess