[lkml]   [2004]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: clone() <-> getpid() bug in 2.6?
    On Sun, Jun 06, 2004 at 09:57:20AM -0700, Linus Torvalds wrote:

    > /* Write the pid into the lockfile, fsync it */
    > write(fd, name + 9, len - 9);
    > fsync(fd);

    Unrelated to this discussion -- and there is a close() missing -- but is
    there any reason for fsync() to be there? I've seen this often before,
    but I've never understood why it would be necessary to force the data to
    disk, especially when it will likely be removed later before it would
    have otherwise been written to disk. Shouldn't the lock file behave
    properly without fsync(), even across NFS, and even across all OSes?

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 14:03    [W:0.018 / U:3.460 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site