Re: unlink or kernel error?
On Sat, 01 Apr 2000, Tadeusz Bak wrote:
> Hi all,
> Sorry, my problem is probably not Debian specific... I tried to run under
> slink with the 2.0.36 kernel the following program:
> #define RUN "/tmp/.rem.run"
> #include <stdio.h>
> #include <sys/types.h>
> #include <sys/stat.h>
> #include <fcntl.h>
> #include <unistd.h>
> open(RUN, O_RDWR|O_CREAT, S_IRUSR|S_IWUSR);
> printf("File created\n");
> printf("File removed\n");
> After the message "File created" I can see that there is a file .rem.run
> in /tmp directory. After "File removed" that file disappears. But
> according to unlink man page it should exist up to the message "Finish"
> because it is not closed. Only after terminating the program kernel
> closes all open files and .rem.run should be removed. Does anybody have
> an idea what's going on here? Thanks!
The thing that happens is that the file name is deleted
from the directory, but its inode is kept until the program closes the