[Development] glib's and Qt's RuntimeLocation [OS X]

René J. V. Bertin rjvbertin at gmail.com
Tue Nov 24 23:04:59 CET 2015


Thiago Macieira wrote:

> It mustn't be $TMPDIR. It needs to be a directory owned by the user so no

You're missing a detail. On OS X, $TMPDIR (and QDir::tempPath()) *are* user 
specific. They're also very "immemorable"...

> It could be a subdir of $TMPDIR, but then we run into a race condition problem
> of creating a secure subdir with a well-established name among applications.
> That's why the XDG spec says that XDG_RUNTIME_DIR *must* have been created
> when the user logs in and must be removed when the user fully logs out.

The former is true for $TMPDIR on OS X, but it is not deleted. The contents are 
wiped at reboot though, so the Unix fallback directory does get cleaned at that 
occasion.

Do you have any idea what RuntimeLocation is used for on hosts that don't follow 
XDG principles (OS X, MS Windows) -- beyond what individual applications can 
decide evidently?

R.




More information about the Development mailing list