Pietro Gagliardi wrote: > What I could do instead is > u=/tmp/$0$pid$apid$0 > ... > but I'd rather not go that way to avoid possible collisions.
Seems that there could be a filesystem that hands out unique names. Another similar approach would be for the open of a new special file to create a unique temp file, which would vanish upon final close, and have the app share/clone the file descriptor, which could be dup2()ed (or whatever Plan9 equivalent is) to stdout, stdin, etc., for the various processes in your script.
