summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorpixel <pixel>2008-02-18 00:55:31 +0000
committerpixel <pixel>2008-02-18 00:55:31 +0000
commit60ee2d57d95314f00d110c70106115c577dbdafa (patch)
tree3981b3b716c0483e8c401c838246b8302d091a78 /lib
parent4bf89877baf5dc6566b4c6475d11c7ff60236dfb (diff)
Preparing changes for ppoll
Diffstat (limited to 'lib')
-rw-r--r--lib/TaskMan.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/TaskMan.cc b/lib/TaskMan.cc
index 7ebdf7d..4cc7fd2 100644
--- a/lib/TaskMan.cc
+++ b/lib/TaskMan.cc
@@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* $Id: TaskMan.cc,v 1.52 2008-01-03 16:10:14 pixel Exp $ */
+/* $Id: TaskMan.cc,v 1.53 2008-02-18 00:55:31 pixel Exp $ */
#ifndef _WIN32
#include <signal.h>
@@ -65,6 +65,9 @@ void taskman_sigpipe(int sig) {
void taskman_sighup(int sig) {
signal(sig, taskman_sighup);
}
+void taskman_sigusr1(int sig) {
+ signal(sig, taskman_sigusr1);
+}
#endif
void TaskMan::CleanChildren() {
@@ -319,6 +322,7 @@ void TaskMan::Init() throw (GeneralException) {
signal(SIGCHLD, taskman_sigchild);
signal(SIGPIPE, taskman_sigpipe);
signal(SIGHUP, taskman_sighup);
+ signal(SIGUSR1, taskman_sigusr1);
sigemptyset(&sigchildset);
sigaddset(&sigchildset, SIGCHLD);
@@ -654,11 +658,11 @@ void TaskMan::MainLoop() throw (GeneralException) {
}
}
-#ifndef _WIN32
+#ifdef _WIN32
+ r = poll(ufsd, nfds, (no_burst) && !(Zombies.size()) && !(got_sigchild) ? timeout: 0);
+#else
sigprocmask(SIG_UNBLOCK, &sigchildset, 0);
-#endif
r = poll(ufsd, nfds, (no_burst) && !(Zombies.size()) && !(got_sigchild) ? timeout: 0);
-#ifndef _WIN32
sigprocmask(SIG_BLOCK, &sigchildset, 0);
#endif
CleanChildren();