Re: Unique /proc/<pid>/fd/ inode numbers?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/30/06, Bernard Blackham <[email protected]> wrote:
> A useful thing to be able to determine when checkpointing a process
> from userspace is whether two file descriptors that point to the
> same file are
>    (a) two independently open()'d instances of the file; or
>    (b) one open() and one dup().
> (the latter case meaning the FDs share locks & seek offsets).
>

I dont see a way  which differentiates between open fd & dup fd. The
only  difference between them is that when doing open it allocates a
new file structure & initializes it while in case of dup the same file
pointer. That's how you share the locks & seek offsets. But I dont see
any kernel code which makes this difference currently. Implementing
this should not be that hard any way

regards
Ram Gupta
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux