lkml.org 
[lkml]   [2002]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: rm-ing files with open file descriptors
    Date
    Followup to:  <a2afsg$73g$2@ncc1701.cistron.net>
    By author: Miquel van Smoorenburg <miquels@cistron.nl>
    In newsgroup: linux.dev.kernel
    >
    > Well no. new_fd will refer to a completely new, empty file
    > which has no relation to the old file at all.
    >
    > There is no way to recreate a file with a nlink count of 0,
    > well that is until someone adds flink(fd, newpath) to the kernel.
    >

    This *might* work:

    link("/proc/self/fd/40", newpath);

    -hpa
    --
    <hpa@transmeta.com> at work, <hpa@zytor.com> in private!
    "Unix gives you enough rope to shoot yourself in the foot."
    http://www.zytor.com/~hpa/puzzle.txt <amsp@zytor.com>
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

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