Search the web
Sign In
New User? Sign Up
rklug · GNU/Linux User Group - Roorkee (India)
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
read() on a deleted file   Message List  
Reply | Forward Message #913 of 930 |
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



Thu Jan 3, 2008 10:31 am

fasih_askiri
Offline Offline
Send Email Send Email

Forward
Message #913 of 930 |
Expand Messages Author Sort by Date

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...
Fasihullah Askiri
fasih_askiri
Offline Send Email
Jan 3, 2008
10:31 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help