harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesse Wilson <jessewil...@google.com>
Subject Re: I'm planning on fixing the "flush exceptions ignored" bug
Date Wed, 04 Nov 2009 16:31:29 GMT
On Wed, Nov 4, 2009 at 4:11 AM, Tim Ellison <t.p.ellison@gmail.com> wrote:

> Like everyone else, I'm avoiding studying sources of Sun code, so can
> you show the test case here (or on a JIRA)?

I attached it in the first message, but it looks like the mailing list
software silently discards attachments. Here's the test inline:

import java.io.BufferedOutputStream;

import java.io.FileNotFoundException;

import java.io.FileOutputStream;

import java.io.IOException;

import java.io.OutputStream;

public class Scratch {

  public static void main(String[] args) throws Exception {

    new ProcessBuilder()

        .command("/usr/bin/hdiutil", "create", "-fs", "HFS+", "-size",

            "-volname", "refreshing", "-attach", "/tmp/refreshing.dmg")



    ChmoddedFileMaker coke = new

    ChmoddedFileMaker pepsi = new

    // this write will succeed because the volume exists


    new ProcessBuilder().command("/sbin/umount", "-f",



    // this write will fail because the volume has disappeared



  static class ChmoddedFileMaker {

    private final String file;

    private final OutputStream out;

    ChmoddedFileMaker(String file) throws FileNotFoundException {

      this.file = file;

      this.out = new BufferedOutputStream(new FileOutputStream(this.file));


    void writeAndChmod(String contents) throws IOException,
InterruptedException {






When this program is executed on the RI, the 2nd write fails but no
exceptions are thrown.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message