about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2013-06-21 03:34:26 +0000
committerEric Wong <normalperson@yhbt.net>2013-06-25 21:34:07 +0000
commit9f43d3eb8cf6a156108c714551a7eb68472e17a4 (patch)
tree852db5569df2338fa8f70fbf0c07a9cad1eff216
parent07569135228020880d8092d9aaf7d6325cc48d26 (diff)
downloadcmogstored-9f43d3eb8cf6a156108c714551a7eb68472e17a4.tar.gz
The "shutdown" command needs to trigger EINTR when using
epoll_pwait, otherwise the sleeping thread may not wake up properly.
-rw-r--r--cmogstored.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmogstored.c b/cmogstored.c
index e7cc154..bec2137 100644
--- a/cmogstored.c
+++ b/cmogstored.c
@@ -533,6 +533,6 @@ void cmogstored_quit(void)
                                "SIGQUIT failed on master process (pid=%d): %m",
                                 master_pid);
         } else {
-                worker_wakeup_handler(SIGQUIT);
+                CHECK(int, 0, kill(getpid(), SIGQUIT));
         }
 }