Messages in this thread | | | Date | Mon, 30 Jan 2006 20:32:33 +0000 | From | Ram Gupta <> | Subject | Re: 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/
| |