]> jspc29.x-matter.uni-frankfurt.de Git - daqdata.git/commitdiff
Make agent/manager more verbose (untested) -- mm
authormuench <muench>
Wed, 27 Aug 2003 12:40:39 +0000 (12:40 +0000)
committermuench <muench>
Wed, 27 Aug 2003 12:40:39 +0000 (12:40 +0000)
hadaq/worker.c

index 8978b64de8d79e64a80aede5aa50babc87a97a41..be697972aafd5e4980c60475c5c0c0b3b19df706 100644 (file)
@@ -1,4 +1,4 @@
-static char *rcsId = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/worker.c,v 6.22 2003-08-27 12:29:31 muench Exp $";
+static char *rcsId = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/worker.c,v 6.23 2003-08-27 12:40:39 muench Exp $";
 
 #define _POSIX_C_SOURCE 199309L
 #include <unistd.h>
@@ -238,6 +238,7 @@ int Worker_start(const char *path, char *const argv[])
        } else {
                if (my->pid == 0) {             /* This is the child, we can not get out of */
                        /* this block */
+                       syslog(LOG_INFO, "Starting worker %d (%s)", my->pid, path);
                        if (0 > execvp(path, argv)) {
                                syslog(LOG_DEBUG, "%s:%d: %s", __FILE__, __LINE__, strerror(errno));
                                syslog(LOG_EMERG, "Starting %s: %s", path, strerror(errno));
@@ -324,6 +325,7 @@ void Worker_stop(const char *name, int timeout)
        if (0 == openStatShm(my)) {
                my->pid = my->statistics[0].value;
                if (my->pid > 0) {
+                       syslog(LOG_INFO, "Stopping worker %d", my->pid);
                        if (0 == kill(my->pid, SIGTERM)) {
                                while (0 == kill(my->pid, 0)) {
                                        struct timespec t = { 1, 0 };