Don't run as daemon (do not fork and put itself into background).
.TP
+.BI \-i " FILE" "\fR,\fP --pidfile " FILE
+Store process id into this file rather than default /var/glite/glite-lb-[notif]-interlogd.pid
+
+.TP
.BI \-f " PREFIX" "\fR,\fP --file-prefix " PREFIX
.I PREFIX
is path prefix of the event files.
#include <errno.h>
#include <string.h>
#include <unistd.h>
+#include <stdio.h>
#include "glite/jobid/cjobid.h"
#include "glite/lb/context.h"
int ret;
if(killflg)
- exit(0);
+ return (0);
clear_error();
if((ret = input_queue_get(&msg, &offset, INPUT_TIMEOUT)) < 0)
il_log(LOG_CRIT, "Fatal error: %s\n", error_get_msg());
if (killflg) {
input_queue_detach();
+ unlink(pidfile);
exit(EXIT_FAILURE);
}
}
il_log(LOG_INFO, "Done!\n");
input_queue_detach();
+ unlink(pidfile);
exit (0);
}
// #define TIMEOUT 5
extern int TIMEOUT;
-#define INPUT_TIMEOUT (60)
+#define INPUT_TIMEOUT (5)
+#define RECOVER_TIMEOUT (60)
#define EXIT_TIMEOUT (1*60)
typedef struct cred_handle {
il_log(LOG_INFO, "New certificate found and deployed.\n");
}
}
- sleep(INPUT_TIMEOUT);
+ sleep(RECOVER_TIMEOUT);
}
}