This fixes several issues related to parsing of parent PIDs:
A process with lines or spaces or parentheses in its process name would confuse the code in X.A.SpawnOn and possibly lead to a Prelude.read: no parse exception.
X.H.WindowSwallowing.isChildOf looked for the parent PID anywhere in the output of pstree, so single-digit parent PIDs would be considered as parents of any process with that digit anywhere in its chain of parent PIDs. (Note that apps in PID namespaces like in Flatpak often have single-digit PIDs.)
[X] I've considered how to best test these changes (property, unit, manually, ...) and concluded:
I only tested isChildOf, getPPIDOf and getPPIDChain in ghci, so this definitely needs more testing. In particular, I'm not a user of SpawnOn, so to test that I'd need to set up a synthetic xmonad config and I don't think I'll be able to do that during the week. 😞
Description
This fixes several issues related to parsing of parent PIDs:
A process with lines or spaces or parentheses in its process name would confuse the code in X.A.SpawnOn and possibly lead to a
Prelude.read: no parse
exception.X.H.WindowSwallowing.isChildOf
looked for the parent PID anywhere in the output of pstree, so single-digit parent PIDs would be considered as parents of any process with that digit anywhere in its chain of parent PIDs. (Note that apps in PID namespaces like in Flatpak often have single-digit PIDs.)pstree
is no longer required in$PATH
.Fixes: https://github.com/xmonad/xmonad-contrib/issues/726
Checklist
[X] I've read CONTRIBUTING.md
[X] I've considered how to best test these changes (property, unit, manually, ...) and concluded:
isChildOf
,getPPIDOf
andgetPPIDChain
in ghci, so this definitely needs more testing. In particular, I'm not a user of SpawnOn, so to test that I'd need to set up a synthetic xmonad config and I don't think I'll be able to do that during the week. 😞[X] I updated the
CHANGES.md
file