
On Tue, Jan 12, 2021 at 05:29:15PM -0500, ivan wrote:
Thanks for the explanation, that makes sense. I looked at the history of 'safeSpawn' and interestingly, it used to call xfork, but that was changed in this commit: https://github.com/xmonad/xmonad-contrib/commit/1844c80978844611f7d409cab7c3...
That commit makes no sense. xfork always did uninstallSignalHandlers. Actually, xfork is still exactly the same function it was in 2009 when it appeared for the first time. The only exaplanation I have is that the reporter of https://code.google.com/archive/p/xmonad/issues/441 used xmonad-contrib that didn't use xfork yet (that is, before https://github.com/xmonad/xmonad-contrib/commit/e8c0f39fd5238771d14b920b8b87...), and reported an issue which gwern tried to fix without knowing it'd already been fixed but the reporter isn't running the fix yet, and pushed yet another fix (1844c8097 that you mentioned) but forgot about stdin. This explanation assumes the problem was in signal handling, but the discussion in https://code.google.com/archive/p/xmonad/issues/441 looks like it was, indeed. So I think 1844c8097 can just be reverted, the issue was most probably already fixed by e8c0f39fd5.
The issue described in that commit, though, seems to be related to signal handlers rather than stdin (though it also sounds like the exact issue may not have been identified).
-- Tomáš Janoušek, a.k.a. Pivník, a.k.a. Liskni_si, https://work.lisk.in/