I've encountered the issue when the status bar suddenly stops updating because dwmblocks hangs for no apparent reason. It happens quite rarely but nevertheless consistently.
As I've been able to figure out it hangs in calls to Xlib functions and the reason is that dwmblocks calls setroot, that sets newly calculated status bar to dwm, from main program loop as well as from signal handlers which are invoked asynchronously at random times interrupting for the moment main program loop.
The problem is that Xlib functions are not reentrant and if called from signal handler while entered and not yet returned in main loop result in a deadlock and hang of the whole application.
I've encountered the issue when the status bar suddenly stops updating because dwmblocks hangs for no apparent reason. It happens quite rarely but nevertheless consistently.
As I've been able to figure out it hangs in calls to Xlib functions and the reason is that dwmblocks calls
setroot
, that sets newly calculated status bar to dwm, from main program loop as well as from signal handlers which are invoked asynchronously at random times interrupting for the moment main program loop.The problem is that Xlib functions are not reentrant and if called from signal handler while entered and not yet returned in main loop result in a deadlock and hang of the whole application.