Re: [dwm] dwm-5.3

From: Anselm R Garbe <garbeam_AT_gmail.com>
Date: Fri, 5 Dec 2008 08:33:44 +0000

2008/12/5 Neale Pickett <neale_AT_woozle.org>:
> Neale Pickett <neale_AT_woozle.org> writes:
>
>> Would you mind sharing how you launch dwm?
>
> It might also be helpful to share your status script. If you launch
> your status script like this:
>
> status | dwm
>
> and status forks, the parent may not be exiting.
>
> If the status program never exits, X won't terminate when you kill dwm.
> To test if yours operates this way, try the following experiment:
>
> xterm1$ status | cat
> xterm2$ kill (pid of cat)
>
> My status program at least keeps on running even though it can no longer
> write to stdout. I think it's because the parent shell, the one outside
> the loop, never gets the SIGPIPE and keeps on running. I'll play with
> it and report back.
>
> This problem isn't related to the recent fork patch, tough; you can
> reproduce this behavior without ever calling spawn.
>
> The reason this doesn't stop X is because your .xsession (or .xinitrc)
> is waiting for all subprocesses to exit. As long as status keeps
> running, .xsession won't exit, and the X server startup script won't
> kill the X server.
>
> Here's something you can put in .xsession to run status as a background
> process and cause your .xsession to exit when dwm exits:
>
> XSTATUS=$HOME/.status.$(hostname).$DISPLAY
> mkfifo -m 600 $XSTATUS
> status > $XSTATUS &
> STATUS_PID=$!
> dwm < $XSTATUS
> kill $STATUS_PID
> rm $XSTATUS

I also think this is rather related to the status feed.

Kind regards,
--Anselm
Received on Fri Dec 05 2008 - 08:33:44 UTC

This archive was generated by hypermail 2.2.0 : Fri Dec 05 2008 - 08:36:04 UTC