Opened 10 years ago

Closed 5 years ago

#215 closed defect (fixed)

Treatment of temporary files when running external programs in ARB

Reported by: fog Owned by: westram
Priority: major Milestone:
Component: no idea Version: arb_5.0
Keywords: Cc:

Description (last modified by westram)

Two problems:

  1. temporary files are created in ~/.arb_tmp with the respective PID of the process - fine so far, but they are not deleted after the process is finished! the respective rmdir command fails because - directory is not empty!. The leads to an accumulation of files in the homedirectories.
  1. additionally, another files is created in /tmp, which is used for converting the Genbank file to the respective infile of the program. Again, this file is not deleted afterwards and for me it does not make sense why this file is written to /tmp and not to ~/.arb_tmp as the temporary files in 1.

All the best

Frank Oliver

Change History (6)

comment:1 Changed 8 years ago by westram

  • Description modified (diff)

comment:2 Changed 5 years ago by westram

  • Owner changed from devel to westram
  • Status changed from new to assigned

comment:3 in reply to: ↑ description Changed 5 years ago by westram

Replying to fog:

  1. temporary files are created in ~/.arb_tmp with the respective PID of the process - fine so far, but they are not deleted after the process is finished! the respective rmdir command fails because - directory is not empty!. The leads to an accumulation of files in the homedirectories.

fixed by [11811]

comment:4 in reply to: ↑ description Changed 5 years ago by westram

Replying to fog:

  1. additionally, another files is created in /tmp, which is used for converting the Genbank file to the respective infile of the program. Again, this file is not deleted afterwards and for me it does not make sense why this file is written to /tmp and not to ~/.arb_tmp as the temporary files in 1.

File is stored in /tmp, because it gets written before the directory '~/.arb_tmp/XXXXX' is created. Similar is true for output-files which are read by arb (after command finishes and after the directory is removed).

comment:5 Changed 5 years ago by epruesse

See also: http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html

They separate into CONFIG, DATA, CACHE and RUNTIME.

CONFIG
This is where changeable user specific stuff goes. So essentially .arb_props
DATA
This is where unchanging user specific stuff goes. This would IMO be things like user-filters and user-gde-extensions.
CACHE
This is where non-essential data goes. So basically .arb_pts
RUNTIME
This is where sockets, named pipes and pid files should go.

The difference between CACHE and RUNTIME is that RUNTIME must be machine-local and must support special files, but may be small.

My suggestion would be to set up variables according to this in SH/arb. Draw them from the XDG_*_HOME variables if those are set, otherwise use "normal" XDG folders. Then arb_launcher should create/remove the directories as needed.

Placing PT servers by default into .cache/arb/pts instead of .arb_pts would also fix the incompatible PT server issue.

Still, probably too much for 6.0, maybe a new ticket for 6.1?

comment:6 Changed 5 years ago by westram

  • Resolution set to fixed
  • Status changed from assigned to closed

by [11813]

Note: See TracTickets for help on using tickets.