lkml.org 
[lkml]   [2002]   [Jan]   [20]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSun, 20 Jan 2002 15:23:59 +0100
FromRemi Turk <>
SubjectRe: rm-ing files with open file descriptors
On Sat, Jan 19, 2002 at 12:50:24AM +0000, Miquel van Smoorenburg wrote:
> There is no way to recreate a file with a nlink count of 0,
> well that is until someone adds flink(fd, newpath) to the kernel.
Which I actually posted a patch for in 2.4.0-test1 time :)
% ll -i old
32619 -rw-r--r--   1 remi     users          14 Jul 31 15:44 old
% exec 5<old
% rm old
% ~/src/flink/flink 5 new
% ll -i new
32619 -rw-r--r--   1 remi     users          14 Jul 31 15:44 new

The more interesting part - open(O_ANONYMOUS) or something like
that looked much harder to do. (IOW, I gave up ;) )

Happy hacking

	Remi

-- 
See the light and feel my warm desire,
Run through your veins like the evening sun
It will live but no eyes will see it,
I'll bless your name before I die.

Key fingerprint = CC90 A1BA CF6D 891C 5B88  C543 6C5F C469 8F20 70F4
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 12:15    [W:2.017 / U:0.130 seconds]
©2003-2008 Jasper Spaans