Skip to content
Snippets Groups Projects
  1. Sep 09, 2020
  2. Sep 08, 2020
  3. Aug 19, 2020
  4. Aug 04, 2020
  5. Jun 16, 2020
  6. Jun 12, 2020
  7. May 21, 2020
  8. May 18, 2020
  9. Apr 15, 2020
  10. Apr 09, 2020
  11. Apr 06, 2020
  12. Apr 01, 2020
  13. Mar 31, 2020
  14. Mar 12, 2020
  15. Mar 06, 2020
  16. Mar 05, 2020
  17. Mar 04, 2020
  18. Feb 27, 2020
  19. Feb 26, 2020
  20. Feb 03, 2020
  21. Jan 23, 2020
  22. Jan 10, 2020
  23. Jan 09, 2020
  24. Jan 08, 2020
    • Simon McVittie's avatar
      tests: Add an "adverb" command that can be used to debug signal handling · 30e8539a
      Simon McVittie authored
      
      This can be wrapped around a command in the same way as env(1) to see
      what happens: in particular, it can undo some of Steam's execution
      environment.
      
      This is a developer tool rather than something for use in production,
      so it's only installed alongside the installed-tests at the moment.
      
      Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
      30e8539a
    • Simon McVittie's avatar
      Unblock signals when spawning subprocesses, and in s-r-s-i · be4aae8d
      Simon McVittie authored
      
      This avoids a coreutils limitation in versions [8.27, 8.29), which
      unfortunately includes Ubuntu 18.04: timeout(1) relied on SIGCHLD not
      being blocked, but did not unblock it themselves.
      
      The Steam client runs s-r-s-i from a thread that has SIGCHLD blocked,
      and SIGALRM, SIGPIPE and SIGTRAP ignored. This is contrary to frequent
      expectations of general-purpose libraries and command-line utilities:
      in particular, SIGPIPE is used by processes writing to a pipe to detect
      that the read end has died, SIGTRAP is frequently used to terminate
      processes on an assertion failure, and SIGCHLD is often necessary for
      subprocess management.
      
      Games (whether Steam or non-Steam) appear to be run with only SIGPIPE
      and SIGTRAP ignored, so strictly speaking, unignoring those two makes
      the behaviour of s-r-s-i unlike the behaviour of actual games. However,
      the effect of unblocking SIGPIPE and SIGTRAP is to make s-r-s-i more
      likely to crash (the default disposition of both those signals is process
      termination), which is probably what we want: if there is any difference,
      we want s-r-s-i's helpers to be more strict than games (crash more often),
      so that they can act as an early-warning system for issues that could
      manifest in games.
      
      In s-r-s-i, don't unblock signals until after we have finished
      command-line parsing and redirected stdout to print to the original
      stderr. Otherwise, g_debug() would go to the original stdout, resulting
      in it being invalid JSON.
      
      Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
      be4aae8d
Loading