[lkml]   [2002]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: rm-ing files with open file descriptors
    In article <>,
    Richard Kettlewell <> wrote:
    >If the file descriptor you have was opened O_RDONLY, but you have
    >write permission on the file itself, then creating a new name for it
    >would allow you to open it O_RDWR.

    /proc allows for this anyway.

    open("knuth.txt", O_RDONLY) = 3
    unlink("knuth.txt") = 0
    open("/proc/self/fd/3", O_RDWR) = 4


    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 13:15    [W:0.031 / U:3.320 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site