Re: When does the Solaris kernel flush data to a file descriptor that is close()'ed?
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > Re: When does the Solaris kernel flush data to a file descriptor that is close()'ed?




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Re: When does the Solaris kernel flush data to a file descriptor that is close()'ed?  
Casper H.S. Dik


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-14-05 12:51 PM

Matty <matty@daemons.net> writes:

>I have been digging through books for the past few days trying to find
>out how the Solaris kernel handles a close() operation. Given the
>following sequence of system calls:

>fd = open("logfile", O_APPEND);
>write(fd, "blah", 4);
>close(fd);
>exit(0);

>When would "blah" actually get written to the file referenced by fd? Do
>the UFS delayed write algorithms kick in here? Does the close() force
>data to be flushed to the file referenced by fd? I can't seem to find a
>definitive answer for this in the close(2) man page, Solaris Systems
>Programming, or Solaris Kernel Internals (If I missed it, please let me
>know. I will wander off and read).

It's a property of the filesystem; as far as I know, Solaris ufs
decides that on last close the data should be flushed so ti will be
written somewhere in the near future.

Casper
--
Expressed in this posting are my opinions.  They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 12:17 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register