Re: [dwm] st - bug with select in run()

From: Anselm R Garbe <>
Date: Wed, 13 May 2009 22:45:27 +0100

Hi Christoph,

2009/5/13 Christoph Schied <>:
> After the select call in run(), the timeout argument gets changed to the
> remaining time to wait, which will result in a timeout of 0 after a few
> iterations. (I think thats implemenetation dependand behaviour)
> Attached is a patch to fix this issue.
> Anyway, the algorithm to find out about the next event (input or x event) is
> not ideal because it will cause the cpu to wake up pretty often, even if
> there is nothing happening in the terminal. I dont know much about XLib, is
> there possibility to find out about a new X Event by querying a fd, which
> could be added to select?

thanks for your patch. The current state of st is very early and it's
undergoing a rewrite in nearly all drawing portions in order to adopt
the still work-in-progress libtg. The select() issue you mention will
be improved through checking the X connections fd similiarly to what
we did in dwm until the switch to X properties for the status text
feed. That will be a better solution than the timeout behavior
currently in use.

Kind regards,
Received on Wed May 13 2009 - 21:45:27 UTC

This archive was generated by hypermail 2.2.0 : Wed May 13 2009 - 22:00:06 UTC