<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    FWIW, Solaris 10 (SPARC), OpenSolaris (SPARC) and openindiana (x64)
    print the same as your Ubuntu installation does.<br>
    <br>
    Regards,<br>
    Andreas<br>
    <br>
    <div class="moz-cite-prefix">Am 08.03.15 21:38, schrieb David T.
      Lewis:<br>
    </div>
    <blockquote cite="mid:20150308203834.GB23605@shell.msen.com"
      type="cite">
      <pre wrap="">On Sun, Mar 08, 2015 at 08:49:40PM +0100, Tobias Pape wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">
On 08.03.2015, at 20:43, Levente Uzonyi <a class="moz-txt-link-rfc2396E" href="mailto:leves@elte.hu">&lt;leves@elte.hu&gt;</a> wrote:

</pre>
        <blockquote type="cite">
          <pre wrap="">On Sun, 8 Mar 2015, Tobias Pape wrote:

</pre>
          <blockquote type="cite">
            <pre wrap="">Hi,

thanks for taking the time to check!


On 08.03.2015, at 20:03, Levente Uzonyi <a class="moz-txt-link-rfc2396E" href="mailto:leves@elte.hu">&lt;leves@elte.hu&gt;</a> wrote:

</pre>
            <blockquote type="cite">
              <pre wrap="">
#flush is pretty costly, and IMO it's called way too often if it's in
#nextChunkPut:. The most common workaround to avoid frequent calls is to use InMidstOfFileinNotification to check if it's a bulk write, and flush only once in those cases. For some reason this technique is not used in case of class comments.
I changed the last lines of ClassDescription &gt;&gt; #classComment:stamp: in my image to

        self organization classComment: (RemoteString newString: aString onFileNumber: 2) stamp: aStamp.
        InMidstOfFileinNotification signal ifFalse: [file flush].
        SystemChangeNotifier uniqueInstance classCommented: self.

Then removed the #flush from WriteStream &gt;&gt; #nextChunkPut:, and it seems to me that the problem is gone.
</pre>
            </blockquote>
            <pre wrap="">
Can you tell me whether the Changes file is read/written via one stream or two?
I understood its  two file descriptors but are these two in different streams or
the same stream?
</pre>
          </blockquote>
          <pre wrap="">
Of course, those are two (or more) different streams. We use SourceFiles at: 2 for writing and CurrentReadOnlySourceFiles at: 2 for reading.
</pre>
        </blockquote>
        <pre wrap="">
Darn; if it had been a ReadWriteStream, one could say that we'd only really needed #flush when
we switch from writing to reading mode?.
So it is more elaborate.

</pre>
      </blockquote>
      <pre wrap="">
I am attaching a small C program that shows the problem. This uses the
same kind of fseek/ftell calls used in the VM FilePlugin. This confirms
the different C runtime behaviour. On my Ubuntu system, an explicit
flush is required, and on my SuSE box, no flush is required.

Levente is probably right in saying that this is not an OS bug. It may
just be different behaviour in different versions of libc.

Dave


</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">
</pre>
    </blockquote>
    <br>
  </body>
</html>