nmh-workers
[Top] [All Lists]

[Nmh-workers] tmp file cleanup

2014-01-19 11:31:05
Here's what we have now for placement of MH/nmh tmp files:

* The nmh-storage profile component, if set, tells mhstore(1) where to
  put its output.  If not set, mhstore uses the current directory.
  This is documented in its man page.

* Most of the programs named mh*, which use the MIME parser, put tmp
  files in the nmh-storage directory, if set.  If not, they put them
  in the MH Path directory.

* Some other programs (dist, forw, prompter, rcvdist, rcvtty, slocal,
  viamail, whatnow), put tmp files in the first non-null location of
  {MHTMPDIR, TMPDIR, TMP, MH Path directory}.

* Some other programs (attach, post) put tmp files only in the MH Path
  directory.

* Some other programs (anno, burst, rcvstore) put tmp files in the
  folder of the message that they're working on.

* MHTMPDIR is used verbatim, even if it is a relative path.

* If a program is terminated by a failure or a signal, its tmp files
  will be left.

* Some programs will seg fault if their specified tmp directory is not
  writable.

Here's what I'd like to change that to:

* The nmh-storage profile component, if set, will only be used by
  mhstore(1) for its outputs, as currently documented in its man page.

* All nmh programs will put tmp files in the first non-null location
  of {MHTMPDIR, TMPDIR, TMP, MH Path directory}.

* If MHTMPDIR is not an absolute path, interpret it as relative to the
  MH Path directory.  This will allow the user to specify, eg., a TMP
  folder or ., relative to their PATH.

* Always remove all tmp files that the program created when it
  terminates for any reason (except kill -KILL).

* Check that a tmp file has been created successfully before
  attempting to use it.

Objections?

David

_______________________________________________
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>