Re: [dwm] dwm-5.3

From: Neale Pickett <neale_AT_woozle.org>
Date: Thu, 04 Dec 2008 21:14:01 -0700

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

Neale
Received on Fri Dec 05 2008 - 04:14:01 UTC

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