XDG_RUNTIME_DIR guarantees that we get the same dir no matter how many times we login.
We can manage multiple pids/sockets ourself per user.
The file we store there will be pid e.g. $XDG_RUNTIME_DIR/upstart/12345
For another session (for the same user) we will have pid e.g. $XDG_RUNTIME_DIR/upstart/15001
This is to support one upstart session per login session.
The will know the current session via environment variable.
Also we can implement `initctl list-sessions` command simply by iterating $XDG_RUNTIME_DIR/upstart/.
XDG_CACHE_HOME is not guaranteed to be cleared, while XDG_RUNTIME_DIR will always be fresh after reboots & complete logouts.
XDG_RUNTIME_DIR guarantees that we get the same dir no matter how many times we login.
We can manage multiple pids/sockets ourself per user.
The file we store there will be pid e.g. $XDG_RUNTIME_ DIR/upstart/ 12345 DIR/upstart/ 15001
For another session (for the same user) we will have pid e.g. $XDG_RUNTIME_
This is to support one upstart session per login session.
The will know the current session via environment variable. DIR/upstart/ .
Also we can implement `initctl list-sessions` command simply by iterating $XDG_RUNTIME_
XDG_CACHE_HOME is not guaranteed to be cleared, while XDG_RUNTIME_DIR will always be fresh after reboots & complete logouts.