>> Maybe we need a new flag in mhn.defaults that says, "Delete the >> temporary file after N seconds". Implementing this should be >> straightforward; just fork(), sleep(), and unlink(). N could be 10 or >> 30 seconds. > >why not fork(), fork(), [exec() in child], wait(), unlink()? > >i.e., wait for the viewer, whatever, to exit, then unlink(), exit(). >(all while the main, parent process, goes back to its thing.)
See David's earlier email; the problem is some viewers (e.g.: xdg-open) return immediately and launch the application in the background. The situation is even more complicated if you try using open(1) on MacOS X. --Ken
