Download raw body.
watch(1) - periodically execute a command and display its output
watch(1) - periodically execute a command and display its output
watch(1) - periodically execute a command and display its output
+void
+on_signal(int signum)
+{
+ quit();
+}
+
+void
+quit(void)
+{
+ erase();
+ refresh();
+ endwin();
+ free(cmdv);
+ exit(EXIT_SUCCESS);
+}
Over my dead body!
That is a massive collection of signal races. I've never seen so many
in one place. It cannot be done that way. It must be a loop that inspects
a sig_atomic_t to perform these things.
watch(1) - periodically execute a command and display its output
watch(1) - periodically execute a command and display its output
watch(1) - periodically execute a command and display its output