Menu

#2015 Use XDG_RUNTIME_DIR for FIFO

Bug
open
nobody
None
5
2018-06-16
2018-05-14
No

SciTE creates a FIFO in /tmp when it starts - It should use /run/user/$uid instead -
See the freedesktop specification:

"$XDG_RUNTIME_DIR defines the base directory relative to which user-specific non-essential runtime files and other file objects (such as sockets, named pipes, ...) should be stored."

( https://specifications.freedesktop.org/basedir-spec/latest/ar01s03.html )

  • the glib command to get XDG_RUNTIME_DIR is g_get_user_runtime_dir, see the attached patch.
1 Attachments

Related

Feature Requests: #1307

Discussion

  • Neil Hodgson

    Neil Hodgson - 2018-05-15

    Doesn't this need to be duplicated in DirectorExtension::CreatePipe?

    Actually, the parts of CheckForRunningInstance that deal with file names and directories probably belong in DirectorExtension.cxx so they can be easily shared with DirectorExtension::CreatePipe.

     
  • Andreas Rönnquist

    Yeah, you are indeed right.

     
  • felix

    felix - 2018-06-16

    Given that it's a backwards-incompatible change, you might as well use sockets instead of pipes. (Or, in fact, a proper RPC protocol like D-Bus, but that would be much more work.) Pipes are ridiculously fragile for this purpose.

     
    • Neil Hodgson

      Neil Hodgson - 2018-06-16

      It isn't incompatibe when ipc.scite.name / ipc.director.name is defined and its easier to change a path than to change APIs.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.