lkml.org 
[lkml]   [2006]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Unique /proc/<pid>/fd/ inode numbers?
On 1/30/06, Bernard Blackham <bernard@blackham.com.au> 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 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: 2006-01-30 21:35    [W:0.080 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site