D17289: KDevelop/Shell: set dedicated TMPDIR

René J.V. Bertin noreply at phabricator.kde.org
Sat Dec 1 19:56:48 GMT 2018


rjvbb created this revision.
rjvbb added a reviewer: KDevelop.
rjvbb added a project: KDevelop.
rjvbb requested review of this revision.

REVISION SUMMARY
  This is a simple patch implementing a dedicated KDevelop temporary directory (on Unix). With this, every session has its own directory for temporary files under the default `QSP::TempLocation` directory, set via the `TMPDIR` env. variable. The clang parser's preamble* files go here, for instance, but also any files the session creates under `QSP::TempLocation` itself.
  
  The entire directory is removed during a clean exit, and also at startup. This takes care of preventing the accumulation of (large) old temporary files I tend to get on Mac.

TEST PLAN
  Tested on Mac and Linux. Processes launched by KDevelop will also see the new directory as their `TempLocation` but I haven't noticed any unwanted side-effects in my workflow. Processes spawned by the session and outliving it may run into issues but how common are those? (The only such processes I create are other KDevelop sessions which are evidently not concerned.)
  
  Setting TEMPDIR (or TEMP) instead of TMPDIR may have the same on MS Windows(?)

REPOSITORY
  R32 KDevelop

REVISION DETAIL
  https://phabricator.kde.org/D17289

AFFECTED FILES
  kdevplatform/shell/core.cpp
  kdevplatform/shell/core_p.h

To: rjvbb, #kdevelop
Cc: kdevelop-devel, glebaccon, hase, antismap, iodelay, vbspam, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20181201/8a5ef41c/attachment.html>


More information about the KDevelop-devel mailing list