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