D17289: KDevelop/Shell: set dedicated TMPDIR

René J.V. Bertin noreply at phabricator.kde.org
Wed Jan 23 15:46:20 GMT 2019

rjvbb added a comment.

  In D17289#395491 <https://phabricator.kde.org/D17289#395491>, @aaronpuchert wrote:
  > Temporary files being left behind after a crash is not unusual. This is why systemd has <https://www.freedesktop.org/software/systemd/man/systemd-tmpfiles.html> `systemd-tmpfiles --clean`.
  Not really relevant outside of the systemd realm, right? :)
  >> Files in TMPDIR are usually private, or else their full path is handed to external apps that need to use them (like sockets), no?
  > Not necessarily: if you open a file from your browser, it's typically stored in `/tmp` and then opened with the associated application.
  Which falls into the "their path is handed to external apps" category...
  > The way I see it, it's exactly the other way around. Just like any other environment variable, `TMP_DIR` is there to let a user control an application's behavior. So an application setting that variable for itself is a bit pointless.
  Note that my patch still uses the TMPDIR value set by the user, as long as QSP::TempLocation does. Which should be the case everywhere.
  > So we could set `TMP_DIR` for ourselves (based on the user-provided `TMP_DIR`), but pass the original environment variable to all subprocesses.
  Milan also suggested that, and I have no qualms with it except possibly for helper apps that are really specific to or used in a way specific to KDevelop. Those c/should use the KDevelop-specific tempdir, IMHO.
  The question is, can we do this env. tweak in a central way? I can start digging but it would help if someone already knows a formal answer.
  For instance, is KDevelop's environment profile feature applied to *every* subprocess that is created? If so we could prepend the original TMPDIR value to the profile's list of key/values (prepend so that the user can still set a value via the profile).
  We'd also have to remember if TMPDIR was NOT set initially...

  R32 KDevelop


To: rjvbb, #kdevelop, kfunk, mwolff
Cc: aaronpuchert, mwolff, pino, kfunk, kdevelop-devel, glebaccon, hase, antismap, iodelay, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20190123/bffcf916/attachment.html>

More information about the KDevelop-devel mailing list