[lkml]   [2005]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH 0/3] *at syscalls: Intro
    Jim Meyering wrote:
    > FYI, the rm in coreutils-cvs is finally thread-safe and race-free,
    > when using openat et al.

    Actually, Jim, I doubt it. There is one more race which cannot be
    solved with the existing interfaces. I want to tackle this next, after
    these changes are decided on.

    The problem is directory creation and then populating it. As in cp -r
    and any backup tool. You currently have to use (at best)

    mkdirat(fd, "some-dir", 0666);
    dfd = openat(fd, "some-dir", O_RDONLY);

    What is needed is a way to create a new directory and return a file
    descriptor for it.

    I was thinking about using

    dfd = openat(fd, "some-dir", O_RDONLY|O_DIRECTORY|O_CREAT, S_IFDIR|0666)

    where the combination of using O_DIRECTORY, O_RDONLY, O_CREAT, and the
    S_IFDIR flag can be recognized. This is a configuration which cannot be
    used successfully in current code. Should probably also work with open().

    ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
    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-12-16 17:29    [W:0.021 / U:20.588 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site