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 ]
|