summaryrefslogtreecommitdiff
path: root/lib/TaskMan.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/TaskMan.cc')
-rw-r--r--lib/TaskMan.cc26
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/TaskMan.cc b/lib/TaskMan.cc
index bf1a6be..a348ab0 100644
--- a/lib/TaskMan.cc
+++ b/lib/TaskMan.cc
@@ -41,7 +41,7 @@ void taskman_sigchild(int sig) {
TaskMan::WaitFor(pid, 0, status);
}
- cerr << "Got SIGCHILD, pid = " << pid << " and status = " << status << endl;
+// cerr << "Got SIGCHILD, pid = " << pid << " and status = " << status << endl;
signal(SIGCHLD, taskman_sigchild);
}
@@ -207,13 +207,13 @@ void TaskMan::MainLoop() throw (GeneralException) {
if (stopped) return;
- cerr << "-=- TaskMan: begin main loop with " << number << " task to manage.\n";
+// cerr << "-=- TaskMan: begin main loop with " << number << " task to manage.\n";
for (TaskList_t::iterator p = TaskList.begin(); p && (p != TaskList.end()); p++) {
Task * t = *p;
- cerr << "-=- TaskMan: task " << t->GetName() << endl;
+// cerr << "-=- TaskMan: task " << t->GetName() << endl;
}
- cerr << "-=- TaskMan: processing burning tasks.\n";
+// cerr << "-=- TaskMan: processing burning tasks.\n";
no_burst = 0;
while (!no_burst) {
@@ -228,7 +228,7 @@ void TaskMan::MainLoop() throw (GeneralException) {
}
if (t->GetState() == TASK_BURST) {
- cerr << "-=- TaskMan: running burning task " << t->GetName() << endl;
+// cerr << "-=- TaskMan: running burning task " << t->GetName() << endl;
t->Run();
/* if the task added some new tasks, we have to rerun the loop */
no_burst = 0;
@@ -247,7 +247,7 @@ void TaskMan::MainLoop() throw (GeneralException) {
/* Now is time to check all the handle and enters into a wait state. */
event = E_HANDLE;
- cerr << "-=- TaskMan: processing handle-waiting tasks.\n";
+// cerr << "-=- TaskMan: processing handle-waiting tasks.\n";
nfds = w4ha.size();
no_burst = 1;
@@ -330,11 +330,11 @@ void TaskMan::MainLoop() throw (GeneralException) {
}
if (q->revents & POLLERR) {
- cerr << _("Error condition with poll, handle ") << q->fd << endl;
+// cerr << _("Error condition with poll, handle ") << q->fd << endl;
}
if (q->revents & POLLHUP) {
- cerr << _("Handle ") << q->fd << _(" hung up.\n");
+// cerr << _("Handle ") << q->fd << _(" hung up.\n");
}
fd = q->fd;
@@ -352,7 +352,7 @@ void TaskMan::MainLoop() throw (GeneralException) {
touched = false;
if ((p->ha->GetHandle() == fd) && (!p->T->IsStopped()) && (p->T->GetState() != TASK_DONE) && (!p->dirthy)) {
// We've got one, launch it.
- cerr << "-=- TaskMan: launching task " << p->T->GetName() << " for handle " << p->ha->GetHandle() << endl;
+// cerr << "-=- TaskMan: launching task " << p->T->GetName() << " for handle " << p->ha->GetHandle() << endl;
w4ha_t w4 = *p;
p->dirthy = true;
@@ -391,7 +391,7 @@ void TaskMan::MainLoop() throw (GeneralException) {
no_zombies = 0;
event = E_TASK;
- cerr << "-=- TaskMan: processing zombies loop.\n";
+// cerr << "-=- TaskMan: processing zombies loop.\n";
while (!no_zombies) {
no_zombies = 1;
@@ -404,7 +404,7 @@ void TaskMan::MainLoop() throw (GeneralException) {
}
if ((o = t->WaitedBy())) {
- cerr << "-=- TaskMan: running task " << o->GetName() << " for task " << t->GetName() << endl;
+// cerr << "-=- TaskMan: running task " << o->GetName() << " for task " << t->GetName() << endl;
etask = t;
o->Run();
@@ -428,7 +428,7 @@ void TaskMan::MainLoop() throw (GeneralException) {
/* To end up the loop, let's recall task waiting for processes */
event = E_PROCESS;
- cerr << "-=- TaskMan: processing child-waiting tasks.\n";
+// cerr << "-=- TaskMan: processing child-waiting tasks.\n";
if (got_sigchild) {
for (vector<w4pr_t>::iterator p = w4pr.begin(); p && (p != w4pr.end()); p++) {
@@ -439,7 +439,7 @@ void TaskMan::MainLoop() throw (GeneralException) {
}
eprocess = p->pr;
estatus = p->status;
- cerr << "-=- TaskMan: running task " << p->T->GetName() << " for process " << p->pr << " (" << p->status << ")\n";
+// cerr << "-=- TaskMan: running task " << p->T->GetName() << " for process " << p->pr << " (" << p->status << ")\n";
t = p->T;
w4pr.erase(p);
got_sigchild--;