Christopher Vance wrote:
> You can already mark a fd 'close on exec'.
> 
> May I suggest a different feature: the ability to mark an open file
> (not just its fd) 'remove on close', with permission checked at mark
> time rather than close time (this status forgotten if not permitted
> when set) and the unlink actually done at close time only if the file
> has exactly one link and one open file instance at that time.

If all you have is an fd, you can not get from an fd to a path
without an exhaustive search of the disk, in most FS's.

Also, leaving the path peresent permits someone to hard-link it
to some other file, to make it stay around.  Since /var has a
/var/tmp, this would be a real danger, I think.

-- Terry
_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to