Re: Delete a file THAT big? Surely you are joking.

[prev] [thread] [next] [lurker] [Date index for 2006/12/18]

From: Yossi Kreinin
Subject: Re: Delete a file THAT big? Surely you are joking.
Date: 17:51 on 18 Dec 2006

> 
> It's entirely reasonable two processes should be able to write to a file.

 >99% of the time it's a bug. <1% of the time that's what you want. You should 
thus be granted with a system call for saying the OS that you're sharing the 
file. If the OS is out of syscalls, it can use yet another ioctl, and I won't 
even squeak to protest about it.

> 
> Oh, you can remove them alright.

To an extent. And that's stupid too.

>  
> Obviously the disk space can't be reclaimed, because a process has a  
> file open still. Therefore it could reasonably expect to be able to  
> read from it, and the data has to come from somewhere. Or should the  OS 
> just make it up?
> 

The OS should not let me remove the file if someone is using it, without even 
telling the one using it. That someone will most of the time keep writing to the 
file, thinking it is *persistent*, which it isn't.

I understand the twisted logic of the maze of hacks known as Unix well enough to 
know that without this feature, there's no way to create truly "hidden" 
temporary files. But even if we consider this reasonable (and ignore the 
beautiful interactions with NFS), writing to a removed file should only work 
from the process which removed it. And *other* processes should not be able to 
remove it.

Generated at 03:01 on 20 Dec 2006 by mariachi 0.52