Skip to content

Writing to temporary files sometimes fails #5

@GoogleCodeExporter

Description

@GoogleCodeExporter
It seems that using some "version" of Windows 8 the redirect of command 
executions to temporary files produces empty files (I also tried to increase 
the value of WAIT_FOR_FILE). I find it difficult to discover which "version" 
causes the problem. Have you ever noticed that problem?

Wouldn't it be better not to write to the disk when you can work with in-memory 
data?

I'd suggest to replace all the code

File f = File.createTempFile("regorexp", ".jta");
Runtime.getRuntime().exec(command).waitFor();       
_waitForFile(f);
br = new BufferedReader(new InputStreamReader(new FileInputStream(f)));


with 


Process proc = Runtime.getRuntime().exec(command);
int exitCode = proc.waitFor();
br = new BufferedReader(new InputStreamReader(proc.getInputStream()));


Do you think there could be any side effects?


Thanks,
   Giacomo Boccardo.

Original issue reported on code.google.com by gboccard on 7 May 2013 at 12:49

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions