Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C Moderated > Re: Behavior of...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 10 Topic 1071 of 1134
Post > Topic >>

Re: Behavior of fwrite(), fseek(), fflush() if the file gets deleted after being opened.

by Mark Bessey <mark_bessey@[EMAIL PROTECTED] > Apr 4, 2008 at 10:34 AM

On Apr 1, 10:16=A0am, Aditya <adityagupta...@[EMAIL PROTECTED]
> wrote:
> I delete the file using rm -f <filename> as soon as the application
> starts before I give it an input to the application(just to clarify, I
> delete it from a different terminal, without stopping the application
> to wait for an input).
> Now I give the input and debug through the application, I find that
> the fseek(), fwrite(), fflush() calls in the application for writing
> to the file do not throw error even though the file is not existant.

This is just the way Unix systems work. A file can be removed while
it's still open, and it'll stick around until it's closed by every
process that has it oipen. Other systems work differently - on
Windows, for example, deleting an oipen file will fail.
-- 
comp.lang.c.moderated - moderation address: clcm@[EMAIL PROTECTED]
 -- you must
have an appropriate newsgroups line in your header for your mail to be
seen,
or the newsgroup name in square brackets in the subject line.  Sorry.
 




 10 Posts in Topic:
Behavior of fwrite(), fseek(), fflush() if the file gets deleted
Aditya <adityagupta.18  2008-04-01 12:16:56 
Re: Behavior of fwrite(), fseek(), fflush() if the file gets del
gordonb.hzgc0@[EMAIL PROT  2008-04-04 10:34:02 
Re: Behavior of fwrite(), fseek(), fflush() if the file gets del
Kenneth Brody <kenbrod  2008-04-04 10:34:07 
Re: Behavior of fwrite(), fseek(), fflush() if the file gets del
=?ISO-8859-1?Q?Hans-Bernh  2008-04-04 10:34:14 
Re: Behavior of fwrite(), fseek(), fflush() if the file gets del
Mark Bessey <mark_bess  2008-04-04 10:34:19 
Re: Behavior of fwrite(), fseek(), fflush() if the file gets del
Keith Thompson <kst-u@  2008-04-04 10:34:21 
Re: Behavior of fwrite(), fseek(), fflush() if the file gets del
Jack Klein <jackklein@  2008-04-04 10:34:29 
[comp.lang.c.moderated] Re: Behavior of fwrite(), fseek(), fflus
Val <Valery_Creux@[EMA  2008-04-04 10:35:23 
Re: Behavior of fwrite(), fseek(), fflush() if the file gets del
Barry Schwarz <schwarz  2008-04-04 10:35:06 
Re: Behavior of fwrite(), fseek(), fflush() if the file gets del
Ivan Chernetsky <ivan_  2008-04-04 10:35:11 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 3:39:02 CDT 2008.