Issue 23 in xmonad: Processes from .xinitrc stay around forever

Issue 23: Processes from .xinitrc stay around forever http://code.google.com/p/xmonad/issues/detail?id=23 New issue report by jaapweel: Typically, xmonad is execed by a script that may have forked off a number of processes before the exec() happened. For instance, I have a .xinitrc that looks like this: ... artsd & gnome-volume-manager & exec /home/weel/opt/bin/xmonad When one of the processes started in the background from .xinitrc exits, it will stay around as a "defunct" process until xmonad quits, because xmonad apparently doesn't wait() on processes that it doesn't even know about. I'm not entirely sure whether this is typical behavior for a window manager, nor whether it should be considered a bug. Issue attributes: Status: New Owner: ---- Labels: Type-Defect Priority-Medium -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings

codesite-noreply@google.com writes:
When one of the processes started in the background from .xinitrc exits, it will stay around as a "defunct" process until xmonad quits, because xmonad apparently doesn't wait() on processes that it doesn't even know about. I'm not entirely sure whether this is typical behavior for a window manager, nor whether it should be considered a bug.
I guess if .xinitrc started them, .xinitrc should wait on them. Kai

kai.grossjohann:
codesite-noreply@google.com writes:
When one of the processes started in the background from .xinitrc exits, it will stay around as a "defunct" process until xmonad quits, because xmonad apparently doesn't wait() on processes that it doesn't even know about. I'm not entirely sure whether this is typical behavior for a window manager, nor whether it should be considered a bug.
I guess if .xinitrc started them, .xinitrc should wait on them.
Kai
I explicitly wait in my .xinitrc, (here's the script exec'd from .xinitrc) FG='#a8a3f7' BG='#3f3c6d' FONT="-xos4-terminus-medium-r-normal--16-160-72-72-c-80-iso8859-1" PATH=/home/dons/bin:$PATH # # with a pipe talking to an external program # PIPE=$HOME/.xmonad-status rm -f $PIPE /sbin/mkfifo -m 600 $PIPE [ -p $PIPE ] || exit # launch the external 60 second clock, and launch the workspace status bar xmonad-clock | dzen2 -e '' -x 300 -w 768 -ta r -fg $FG -bg $BG -fn $FONT & # and a workspace status bar dzen2 -e '' -w 300 -ta l -fg $FG -bg $BG -fn $FONT < $PIPE & # go for it xmonad > $PIPE & # wait for xmonad wait $! pkill -HUP dzen2 pkill -HUP -f xmonad-clock wait What do other wms do? -- Don
participants (3)
-
codesite-noreply@google.com
-
dons@cse.unsw.edu.au
-
Kai Grossjohann