public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: John M Collins <jmc@xisl.com>
To: Hugh Dickins <hugh@veritas.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Question about memory-mapped files
Date: Wed, 28 May 2003 20:20:03 +0100	[thread overview]
Message-ID: <3ED50BE3.8090105@xisl.com> (raw)
In-Reply-To: Pine.LNX.4.44.0305281818230.1427-100000@localhost.localdomain

Hugh Dickins wrote:

>On Wed, 28 May 2003, John M Collins wrote:
>  
>
>>If I invoke mmap to map a file to memory, and it succeeds, can I safely 
>>close the original file descriptor and rely on the memory still being 
>>mapped and the file still updated (possibly with mysnc)?
>>    
>>
>
>Yes, that's definitely a part of the specification of mmap,
>even if it's not mentioned on the man page.
>
>Note that the file on disk is likely not to be updated until
>some time after you unmap it, unless you use msync to force it.
>
Thanks - FYI the file mod time eventually got updated on HP-UX but not 
on Solaris (2.9) or Linux (2.4.21) - and it doesn't seem to update it 
even if you don't close the f.d. I think that has to be wrong if the 
manual page is anything to go by.

-- 
John Collins Xi Software Ltd www.xisl.com




  reply	other threads:[~2003-05-28 19:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-28 16:32 Question about memory-mapped files John M Collins
2003-05-28 17:26 ` Hugh Dickins
2003-05-28 19:20   ` John M Collins [this message]
2003-05-29  6:17     ` Hugh Dickins

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=3ED50BE3.8090105@xisl.com \
    --to=jmc@xisl.com \
    --cc=hugh@veritas.com \
    --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