Scheduler: Output process pid in 'Scheduler task haning' message
g0dil [Fri, 28 Aug 2009 12:39:35 +0000 (12:39 +0000)]
git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1352 270642c3-0616-0410-b53a-bc976706d245

senf/Scheduler/FIFORunner.cc

index 4d7db5d..f321b1c 100644 (file)
@@ -248,7 +248,12 @@ prefix_ void senf::scheduler::detail::FIFORunner::watchdogError()
                                 'a', 'b', 'c', 'd', 'e', 'f' };
     static void * entries[SENF_DEBUG_BACKTRACE_NUMCALLERS];
     
-    write(1, "\n\n*** Scheduler task hanging: ", 30);
+    write(1, "\n\n*** Scheduler task hanging (pid ",34);
+    static char pid[7];
+    ::snprintf(pid, 7, "%6d", ::getpid());
+    pid[6] = 0;
+    write(1, pid, 6);
+    write(1, "): ", 3);
     write(1, runningName_.c_str(), runningName_.size());
     write(1, " at\n ", 3);