Tuesday, September 29, 2009

[rdkeeiwr] Per-process TMP

A simple way to provide every process with its own scratch space is for the operating system to call mktemp -d before spawning a new process, and set the TMP environment variable to it for the process. And the process is free to use or ignore the variable.

For shells, the value of the child is provided to the parent.

A more complicated way to do it involves the OS restricting a process to only its temp space, and maybe its parent's if the parent has granted permission. And probably child processes.

No comments :