#4 Delete err_, out_ and in_ temp files on exit

closed
nobody
None
5
2014-07-31
2011-08-29
No

The wrapper creates on every start err_, out_ and in_ files in the temp dir.
By adding:

fOut.deleteOnExit();
fErr.deleteOnExit();
fIn.deleteOnExit();

in org.rzo.yajsw.app.WrapperManagerImpl.teeSystemStreams(String outFile, String path, boolean visible) you make sure that these files will be deleted on normal exit.

It would be great if the jna*.tmp files in the temp dir would be cleaned up too, but we couldnt find the lines where these file were created.

Dennis

Discussion

  • rzo

    rzo - 2011-09-04

    hello,

    this was implemented in the past and later removed.
    reason: there were cases where the jvm did not delete the files on exit. in some rare cases the jvm just hang.

    the same goes for jna: jna tried to solve it by spawning a process which would delete the file. It happend that the process hang. The according code in com.sun.jna.Platform has therefore been commented out.

    i suppose that the problems are due to the latency of windows freeing resources such as handlers.

    for the sake of stability, this feature has therefore been removed.

    what maybe could be done is remove old tmp files on startup.

    what do you think ?

    -- Ron

     
  • Dennis Dahlmann

    Dennis Dahlmann - 2011-12-01
    • status: open --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks