]> Dogcows Code - chaz/tint2/blobdiff - src/clock/clock.c
*fix* unset sigmask only for child fork
[chaz/tint2] / src / clock / clock.c
index 200996ebd4263c3d95516930cbc7bde578380cd4..578a2b2e2d25842a581cf40a530fd9873e45ffb8 100644 (file)
@@ -23,6 +23,7 @@
 #include <cairo-xlib.h>
 #include <pango/pangocairo.h>
 #include <unistd.h>
+#include <signal.h>
 
 #include "window.h"
 #include "server.h"
@@ -61,6 +62,7 @@ void update_clocks()
 
 const char* clock_get_tooltip(void* obj)
 {
+       strftime(buf_tooltip, sizeof(buf_tooltip), time_tooltip_format, localtime(&time_clock.tv_sec));
        return buf_tooltip;
 }
 
@@ -263,6 +265,10 @@ void clock_action(int button)
                pid_t pid;
                pid = fork();
                if (pid == 0) {
+                       // change for the fork the signal mask
+                       sigset_t sigset;
+                       sigprocmask(SIG_SETMASK, &sigset, 0);
+                       sigprocmask(SIG_UNBLOCK, &sigset, 0);
                        execl("/bin/sh", "/bin/sh", "-c", command, NULL);
                        _exit(0);
                }
This page took 0.0211 seconds and 4 git commands to generate.