Skip to content
Snippets Groups Projects
  1. Nov 17, 2022
    • Simon McVittie's avatar
      log: Add file descriptor management in _srt_util_set_glib_log_handler() · 944a376f
      Simon McVittie authored
      
      This does a few closely related things.
      
      If standard input, standard output and standard error are closed, we
      open them to point to /dev/null, and if they are close-on-exec, we
      clear their close-on-exec flags. This is to avoid weird side effects:
      most APIs like open() that create new file descriptors guarantee to use
      the lowest-numbered fd that is not already in use, but users of those
      APIs do not expect to be overwriting stdin/stdout/stderr.
      
      Because that operation can involve changing the meaning of stdout and
      stderr, we now optionally save a duplicate of the original standard
      output and standard error, so they can be put back later.
      
      Because we're now saving a duplicate of the original standard output and
      standard error, it also makes sense to implement
      SRT_LOG_FLAGS_DIVERT_STDOUT here. This avoids needing to call
      _srt_divert_stdout_to_stderr() separately in most callers.
      
      Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
      944a376f
    • Simon McVittie's avatar
      log: Merge g_set_prgname() into _srt_util_set_glib_log_handler() · cad125f4
      Simon McVittie authored
      
      If we are going to write to the systemd Journal, we will want the
      program name to already be known, so that we can use it as the syslog
      identifier (first argument to sd_journal_stream_fd() and openlog()).
      
      This also reduces duplication a bit, and brings us one step closer to
      combining _srt_util_set_up_logging() with
      _srt_util_set_glib_log_handler().
      
      Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
      cad125f4
  2. Nov 16, 2022
  3. Nov 03, 2022
  4. Sep 07, 2022
  5. Aug 25, 2022
  6. Aug 19, 2022
  7. Jul 29, 2022
  8. Jul 28, 2022
  9. Jul 25, 2022
    • Simon McVittie's avatar
      launch-options: Simplify launcher-service integration · 1e478218
      Simon McVittie authored
      
      We're now looking at using descriptive tool names like "proton"
      and "container-runtme", rather than app-IDs. Follow that here.
      
      Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
      1e478218
    • Simon McVittie's avatar
      bin: Add a simpler interface to wrap a game in the launcher-service · c0842d08
      Simon McVittie authored
      
      If launcher-service is (mostly) mechanism, then this is policy.
      It uses argv[1] and $STEAM_COMPAT_LAUNCHER_SERVICE to decide whether
      to wrap a launcher-service around a game process. The idea is that
      Steam will set STEAM_COMPAT_LAUNCHER_SERVICE to the most appropriate
      layer of the stack at which to be inserting arbitrary debugging
      commands into a game.
      
      In previous prototypes, this was open-coded into each compat tool, but
      centralizing it is a lot easier for compat tool authors. Put a version
      in the name we use, to ensure that if we find we need to make breaking
      changes, we can rename to a new interface version (and optionally keep
      the old one around too).
      
      To minimize its startup time cost, this doesn't use GLib, only glibc.
      
      Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
      c0842d08
    • Simon McVittie's avatar
      launcher-service: Optionally show a hint about how to connect · 45d542a6
      Simon McVittie authored
      
      In the current prototypes, each compat tool is responsible for
      displaying a hint like this (if it wants to), but there are two problems
      with that:
      
      - each compat tool has to duplicate the code for finding a launch-client
        and suggesting how to launch it;
      - the compat tools can't know whether the service is providing multiple
        bus names via the --session option
      
      Move responsibility for this into the service.
      
      Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
      45d542a6
    • Simon McVittie's avatar
      launch-options: Don't create a redundant xterm wrapper · 54ab89d4
      Simon McVittie authored
      
      The precedence here was interpreted as
      
          s is not None or (t is not None and not h)
      
      instead of the intended
      
          (s is not None or t is not None) and not h
      
      resulting in an unintended second layer of xterm wrapper, even when
      using a container runtime.
      
      Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
      54ab89d4
  10. Jul 21, 2022
  11. Jul 20, 2022
  12. Jun 24, 2022
  13. Jun 23, 2022
  14. Jun 22, 2022
  15. Jun 16, 2022
  16. Jun 15, 2022
Loading