Open begone-prop opened 1 year ago
Also forgot to add that signal dispositions are now set up by sigaction()
rather than signal()
.
Can't really tell you anything other than "doesn't work" at this point.
The program doesn't die, but ceases to update pretty frequently.
Haven't looked at the code.
Strange, apart from some missing glyphs on my end everything seems to be working as expected. Does the entire status bar fail to update or just individual blocks?
Regardless, I'll take another look and run some more tests. Thanks for the feedback.
The whole bar freezes. The freeze happens pretty consistently a second or so in if not immediately.
Sorry I can't be more helpful. I've tried disabling different modules and it doesn't seem to make a difference.
Should be fixed now.
This PR changes the way dwmblocks functions. Instead of sleeping and checking periodically if a blocks needs to be updated a POSIX interval timer is created for each block. On expiry of this timer a either a signal is sent to the process by the kernel that invokes the signal handler for that block or if the block is setup with a signal of 0 a new thread is spawned for the block which executes the command provided to said block.
The main process after setting up each timer simply calls pause() and waits for a delivery of a signal.
These changes should improve performance and reduce CPU usage.
The program now also needs to be linked with
-lrt
.