<table><tr><td style="">rjvbb added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D17289">View Revision</a></tr></table><br /><div><div><blockquote style="border-left: 3px solid #8C98B8;
          color: #6B748C;
          font-style: italic;
          margin: 4px 0 12px 0;
          padding: 8px 12px;
          background-color: #F8F9FC;">
<div style="font-style: normal;
          padding-bottom: 4px;">In <a href="https://phabricator.kde.org/D17289#395491" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;">D17289#395491</a>, <a href="https://phabricator.kde.org/p/aaronpuchert/" style="
              border-color: #f1f7ff;
              color: #19558d;
              background-color: #f1f7ff;
                border: 1px solid transparent;
                border-radius: 3px;
                font-weight: bold;
                padding: 0 4px;">@aaronpuchert</a> wrote:</div>
<div style="margin: 0;
          padding: 0;
          border: 0;
          color: rgb(107, 116, 140);"></div>
</blockquote>



<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>Temporary files being left behind after a crash is not unusual. This is why systemd <a href="https://www.freedesktop.org/software/systemd/man/systemd-tmpfiles.html" class="remarkup-link" target="_blank" rel="noreferrer">has</a> <tt style="background: #ebebeb; font-size: 13px;">systemd-tmpfiles --clean</tt>.</p></blockquote>

<p>Not really relevant outside of the systemd realm, right? :)</p>

<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>Files in TMPDIR are usually private, or else their full path is handed to external apps that need to use them (like sockets), no?</p></blockquote>

<p>Not necessarily: if you open a file from your browser, it's typically stored in <tt style="background: #ebebeb; font-size: 13px;">/tmp</tt> and then opened with the associated application.</p></blockquote>

<p>Which falls into the "their path is handed to external apps" category...</p>

<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>The way I see it, it's exactly the other way around. Just like any other environment variable, <tt style="background: #ebebeb; font-size: 13px;">TMP_DIR</tt> is there to let a user control an application's behavior. So an application setting that variable for itself is a bit pointless.</p></blockquote>

<p>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.</p>

<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>So we could set <tt style="background: #ebebeb; font-size: 13px;">TMP_DIR</tt> for ourselves (based on the user-provided <tt style="background: #ebebeb; font-size: 13px;">TMP_DIR</tt>), but pass the original environment variable to all subprocesses.</p></blockquote>

<p>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.<br />
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.<br />
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).</p>

<p>We'd also have to remember if TMPDIR was NOT set initially...</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R32 KDevelop</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D17289">https://phabricator.kde.org/D17289</a></div></div><br /><div><strong>To: </strong>rjvbb, KDevelop, kfunk, mwolff<br /><strong>Cc: </strong>aaronpuchert, mwolff, pino, kfunk, kdevelop-devel, glebaccon, hase, antismap, iodelay, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd<br /></div>