Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.development.apps > #186

Re: mmap unuseable for interactive application?

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.musoftware.de!wum.musoftware.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From Rainer Weikusat <rweikusat@mssgmbh.com>
Newsgroups comp.os.linux.development.apps
Subject Re: mmap unuseable for interactive application?
Date Sun, 17 Jul 2011 19:40:58 +0100
Lines 31
Message-ID <87y5zwvjgl.fsf@sapphire.mobileactivedefense.com> (permalink)
References <d705ca54-6b36-4ca6-933f-76781332f53e@e20g2000prf.googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
X-Trace individual.net JM2mhRNTGg7YcvP7C70DMgMRwEEMWCCywAMEFTIMT7hn07cxg=
Cancel-Lock sha1:hIp0LkFgRwYxQ2GvA47eK3cRccQ= sha1:zOQ3fQdzCyjidMmcibB/7UPL7CM=
User-Agent Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)
Xref x330-a1.tempe.blueboxinc.net comp.os.linux.development.apps:186

Show key headers only | View raw


Peter <excessphase@gmail.com> writes:
> I was wondering about some crash of my application, which always
> seemed to happen, when I edit the file currently read by it.
> As it turns out, when editing the file one may truncate it,
> which makes some area of memory created via mmap unuseable.
> This is even documented in the man page of mmap.

"Concurrent access to shared resources requires ... COORDINATION !!!!
 The end of the world is sure to follow soon !!"

> So -- not only should one not use mmap to write into a sparse file
> (as one may get an unuseable SIGSEGV/SIGBUS for "out of diskspace"

Nope. For 'out of memory' ...

> (please don't suggest setjmp/longjmp to me)).

... but it DON'T WANT to handle that ...

> The same is true for readonly access to a file via mmap.
> If at least one could make certain, that no other handle can be
> created for this file while one is using it. But I was told earlier,
> this is a feature -- not a bug!

It is documented. Consequently, it's a feature,

> I again want congratulate apple for choosing linux as the basis for
> their OS!

They didn't. They are using a bastardized microkernel and BSD.

Back to comp.os.linux.development.apps | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

mmap unuseable for interactive application? Peter <excessphase@gmail.com> - 2011-07-16 16:23 -0700
  Re: mmap unuseable for interactive application? Richard Kettlewell <rjk@greenend.org.uk> - 2011-07-17 10:52 +0100
    Re: mmap unuseable for interactive application? pacman@kosh.dhis.org (Alan Curry) - 2011-07-17 20:59 +0000
      Re: mmap unuseable for interactive application? Peter <excessphase@gmail.com> - 2011-07-17 14:05 -0700
        Re: mmap unuseable for interactive application? Rainer Weikusat <rweikusat@mssgmbh.com> - 2011-07-18 12:45 +0100
          Re: mmap unuseable for interactive application? Peter <excessphase@gmail.com> - 2011-07-18 07:30 -0700
            Re: mmap unuseable for interactive application? Rainer Weikusat <rweikusat@mssgmbh.com> - 2011-07-18 15:42 +0100
              Re: mmap unuseable for interactive application? Peter <excessphase@gmail.com> - 2011-07-18 07:46 -0700
                Re: mmap unuseable for interactive application? Rainer Weikusat <rweikusat@mssgmbh.com> - 2011-07-18 15:50 +0100
                Re: mmap unuseable for interactive application? Rainer Weikusat <rweikusat@mssgmbh.com> - 2011-07-18 19:17 +0100
                Re: mmap unuseable for interactive application? Peter <excessphase@gmail.com> - 2011-07-18 12:49 -0700
                Re: mmap unuseable for interactive application? Peter <excessphase@gmail.com> - 2011-07-18 12:51 -0700
                Re: mmap unuseable for interactive application? Peter <excessphase@gmail.com> - 2011-07-18 13:08 -0700
                Re: mmap unuseable for interactive application? Rainer Weikusat <rweikusat@mssgmbh.com> - 2011-07-18 22:24 +0100
                Re: mmap unuseable for interactive application? Peter <excessphase@gmail.com> - 2011-07-18 15:04 -0700
                Re: mmap unuseable for interactive application? Peter <excessphase@gmail.com> - 2011-07-18 15:21 -0700
                Re: mmap unuseable for interactive application? Rainer Weikusat <rweikusat@mssgmbh.com> - 2011-07-19 13:59 +0100
              Re: mmap unuseable for interactive application? Peter <excessphase@gmail.com> - 2011-07-18 07:50 -0700
      Re: mmap unuseable for interactive application? Richard Kettlewell <rjk@greenend.org.uk> - 2011-07-18 10:59 +0100
        Re: mmap unuseable for interactive application? pacman@kosh.dhis.org (Alan Curry) - 2011-07-18 20:14 +0000
  Re: mmap unuseable for interactive application? Rainer Weikusat <rweikusat@mssgmbh.com> - 2011-07-17 19:40 +0100
    Re: mmap unuseable for interactive application? Peter <excessphase@gmail.com> - 2011-07-17 14:11 -0700
      Re: mmap unuseable for interactive application? Rainer Weikusat <rweikusat@mssgmbh.com> - 2011-07-18 12:46 +0100
    Re: mmap unuseable for interactive application? Peter <excessphase@gmail.com> - 2011-07-17 14:13 -0700
      Re: mmap unuseable for interactive application? Rainer Weikusat <rweikusat@mssgmbh.com> - 2011-07-18 13:49 +0100
        Re: mmap unuseable for interactive application? Peter <excessphase@gmail.com> - 2011-07-18 07:37 -0700

csiph-web