Терминал Xmonad создает три процесса

279
Zhen

Я настраиваю xmonad. Я изменил терминал на, terminal="urxvt"но мне не нравится, что он порождает три процесса для каждого терминала, который я открываю:

~$ ps -fea --forest fake 16042 12136 0 11:22 ? 00:00:00 \_ /bin/sh -c urxvt fake 16043 16042 0 11:22 ? 00:00:00 | \_ urxvt fake 16044 16043 0 11:22 pts/2 00:00:00 | \_ bash 

Как я могу это исправить? Могу ли я удалить /bin/sh -c urxvtпроцесс?

0

1 ответ на вопрос

1
Dan D.

Internally XMonad uses spawn in XMonad.Core:

spawn :: MonadIO m => String -> m ()

spawn. Launch an external application. Specifically, it double-forks and runs the String you pass as a command to /bin/sh.

So if one wants to only change the terminal value, rather than using say executeFile directly, one would have to use exec in the shell command, terminal="exec urxvt", which would remove the extra /bin/sh by causing it to exec the command rather than the shell being the process's parent.

Похожие вопросы