<blockquote>
<p>But yeah, I'm quite sure it could be handled by improving the robustness of plugin's code, without modifying the API.</p>
</blockquote>

<p><a href="https://github.com/codebrainz" class="user-mention">@codebrainz</a> it would be good if its possible, but I currently can't see how without breaking the plugins existing, more common, use-cases just for this very rare problem.  Hence my insistence on details.  But also I definitely don't want to re-factor the existing save code so an external solution is good.</p>

<blockquote>
<p>assuming it inter-operates alright with Geany's various file saving strategies.</p>
</blockquote>

<p>We could probably make the Geany file write code use the fd, but unfortunately neither Glibs <code>g_file_set_contents</code> or GIOs <code>g_file_replace_contents</code> accepts a file descriptor, and nor could they, remember they write to a temp file and rename over the result file, they never write directly to the result file.  I guess we just have to accept that there is a slight race condition risk <code>¯\_(ツ)_/¯</code></p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/geany/geany/issues/815#issuecomment-165081256">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ4b6Hm2CsJy1QTnbR-Mj8IGwQ82oks5pQUctgaJpZM4G04_e.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/geany/geany/issues/815#issuecomment-165081256"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>