lkml.org 
[lkml]   [1998]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: showstopper race condition in sync() ??? [2.1.119|120]
    Date
    In article <Pine.GSO.4.02A.9809151159520.9352-100000@aaricia>,
    Cyrille Chepelov <chepelov@rip.ens-cachan.fr> wrote:
    > On Tue, 15 Sep 1998, Stephen C. Tweedie wrote:
    >
    > > Because _this_ file is the one which is occupying the problematic
    > > sectors, I imagine. One thing you could do is to rename the password
    > > file and then copy it back, so that you are now using a different area
    > > of the disk.
    >
    > "strace passwd" shows that passwd copies /etc/passwd into /etc/passwd-,
    > builds a new file /etc/passwd+, rm's /etc/passwd, then renames
    > /etc/passwd+ to /etc/passwd

    Why does it unlink /etc/passwd instead of doing an atomic rename(2) to
    replace it?
    --
    Shields, CrossLink.

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:44    [W:0.027 / U:1.388 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site