Hiltjo Posthuma wrote in <zuqf-jlei0omn...@cow.codemadness.org>: |On Thu, Sep 12, 2024 at 05:44:22AM +0200, Steffen Nurpmeso wrote: |> Ok, sorry, but one final (hopefully) question. |> |> dmenu_run does "xy | /bin/sh &". |> Like this the thing then is owned by PID 1. |> I use (instead of dmenu_run) ... |> exec ${SHELL:-"/bin/sh"} -c "$cmd" |> |> Like this "$cmd" is owned by dwm. |> I only wonder *why* this is backgrounded. |> Thank you. | |You could use setsid if you want or dont want.
spawn() already does setsid. steffen 1367 1359 0 0.0 3514 7984 S 00:00:03 Sep09 tty1 \_ dwm steffen 1378 1367 0 0.0 5517 11364 S 00:01:58 Sep09 tty1 \_ st -n stgrey -t accu steffen 1394 1378 0 0.0 2124 4232 Ss+ 00:00:00 Sep09 pts/0 \_ tmux a steffen 5048 1 0 0.0 661 332 S 00:00:00 00:07 ? sh steffen 5049 5048 0 0.0 1386 260 S 00:00:00 00:07 ? \_ sleep 10 vs steffen 1367 1359 0 0.0 3514 7984 S 00:00:03 Sep09 tty1 \_ dwm steffen 1378 1367 0 0.0 5517 11364 S 00:01:58 Sep09 tty1 \_ st -n stgrey -t accu steffen 1394 1378 0 0.0 2124 4232 Ss+ 00:00:00 Sep09 pts/0 | \_ tmux a steffen 5072 1367 0 0.0 1386 260 Ss 00:00:00 00:07 ? \_ sleep 10 It does not really matter. (Except that here there is PAM and tmux and some other programs are daemonized and now owned by init, which counteracts PAM sessions as such. But surely dwm is the false address for being a "reaper" anyway.) Thanks for the answer.. --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt)