Skip to content
Snippets Groups Projects
  1. May 27, 2021
  2. Apr 27, 2021
  3. Apr 22, 2021
  4. Mar 23, 2021
  5. Feb 22, 2021
  6. Jan 28, 2021
  7. Jan 25, 2021
  8. Nov 18, 2020
  9. Nov 17, 2020
  10. Oct 26, 2020
  11. Oct 22, 2020
  12. Oct 07, 2020
  13. Sep 28, 2020
  14. Jul 09, 2020
  15. Jun 10, 2020
  16. Apr 24, 2020
  17. Apr 20, 2020
  18. Apr 14, 2020
  19. Apr 01, 2020
  20. Mar 10, 2020
  21. Mar 06, 2020
  22. Mar 05, 2020
  23. Mar 04, 2020
  24. Feb 12, 2020
  25. Feb 10, 2020
  26. Jan 17, 2020
  27. Jan 09, 2020
  28. Jan 08, 2020
    • 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
  29. Jan 07, 2020
  30. Dec 09, 2019
  31. Dec 05, 2019
Loading