From: Ram Gupta <ram.gupta5@gmail.com>
To: Bernard Blackham <bernard@blackham.com.au>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Unique /proc/<pid>/fd/ inode numbers?
Date: Mon, 30 Jan 2006 20:32:33 +0000 [thread overview]
Message-ID: <728201270601301232v6da6fc2el7148ec33896d6b97@mail.gmail.com> (raw)
In-Reply-To: <20060130163748.GC8154@blackham.com.au>
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
prev parent reply other threads:[~2006-01-30 20:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-30 16:37 Bernard Blackham
2006-01-30 20:32 ` Ram Gupta [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=728201270601301232v6da6fc2el7148ec33896d6b97@mail.gmail.com \
--to=ram.gupta5@gmail.com \
--cc=bernard@blackham.com.au \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®