[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
read() on a deleted file
- From: "Fasihullah Askiri" <fasihullah askiri gmail com>
- To: ext3-users redhat com
- Subject: read() on a deleted file
- Date: Thu, 3 Jan 2008 16:00:22 +0530
Hi all
I have a doubt regarding the behaviour of read() on an ext3
filesystem. To elucidate my doubts, I wrote a small program opens a
file and reads one byte at a time and sleeps for a while. I deleted
the file while the read was still in progress and I noticed that the
read still succeeds. How does this work? Does the kernel not free the
inode when the file is deleted but there is a pending read? To check
this, instead of deleting, I tried shred-ding the file, the read still
gets the correct data.
My questions:
- Where does the kernel get the data from?
- Is this a documented feature which I can use?
- Does shred write the file inode with junk?
Thanks for your patience
--
Keep Running.... And Relish the run...
+Fasih
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]