diff --git a/mbtask/callstat.c b/mbtask/callstat.c index d49cf0e6..24ee7ada 100644 --- a/mbtask/callstat.c +++ b/mbtask/callstat.c @@ -1,11 +1,10 @@ /***************************************************************************** * - * File ..................: mbtask/callstat.c + * $Id$ * Purpose ...............: Read mailer last call status - * Last modification date : 08-Jul-2001 * ***************************************************************************** - * Copyright (C) 1997-2001 + * Copyright (C) 1997-2002 * * Michiel Broek FIDO: 2:280/2802 * Beekmansbos 10 diff --git a/mbtask/callstat.h b/mbtask/callstat.h index dbe5bdbc..52e01c4b 100644 --- a/mbtask/callstat.h +++ b/mbtask/callstat.h @@ -1,6 +1,8 @@ #ifndef CALLSTAT_H #define CALLSTAT_H +/* $Id$ */ + #define ST_PORTERR 1 #define ST_NOCONN 2 diff --git a/mbtask/mbtask.c b/mbtask/mbtask.c index 5bba856e..1a1a9b89 100644 --- a/mbtask/mbtask.c +++ b/mbtask/mbtask.c @@ -584,12 +584,12 @@ int checktasks(int onsig) if (first && task[i].rc) { first = FALSE; - tasklog('t', "Task Type pid stat status rc status"); - tasklog('t', "---------------- ------- ----- ---- ----------- ----- --------"); + tasklog('t', "Task Type pid stat rc"); + tasklog('t', "---------------- ------- ----- ---- -----"); for (j = 0; j < MAXTASKS; j++) if (strlen(task[j].name)) - tasklog('t', "%-16s %s %5d %s %-11d %5d %08x", task[j].name, callmode(task[j].tasktype), - task[j].pid, task[j].running?"runs":"stop", task[j].status, task[j].rc, task[j].status); + tasklog('t', "%-16s %s %5d %s %5d", task[j].name, callmode(task[j].tasktype), + task[j].pid, task[j].running?"runs":"stop", task[j].rc); } switch (task[i].rc) { @@ -607,7 +607,6 @@ int checktasks(int onsig) count++; break; default: - tasklog('+', "errno=%d %s", errno, strerror(errno)); if (WIFEXITED(task[i].status)) { rc = WEXITSTATUS(task[i].status); if (rc) @@ -652,7 +651,10 @@ void die(int onsig) int i, count; signal(onsig, SIG_IGN); - tasklog('+', "Shutting down on signal %s", SigName[onsig]); + if (onsig == SIGTERM) + tasklog('+', "Starting normal shutdown"); + else + tasklog('+', "Abnormal shutdown on signal %s", SigName[onsig]); /* * First check if there are tasks running, if so try to stop them @@ -681,6 +683,11 @@ void die(int onsig) } } + if ((count = checktasks(0))) + tasklog('?', "Shutdown with %d tasks still running", count); + else + tasklog('+', "Good, no more tasks running"); + ulocktask(); if (sock != -1) close(sock); diff --git a/mbtask/mbtask.h b/mbtask/mbtask.h index c7270d8a..70671963 100644 --- a/mbtask/mbtask.h +++ b/mbtask/mbtask.h @@ -1,8 +1,9 @@ -/* $Id */ - #ifndef _MBTASK_H #define _MBTASK_H +/* $Id$ */ + + /* * Defines. * SLOWRUN is number of seconds for scheduling mailer calls. Leave at 20! diff --git a/mbtask/outstat.c b/mbtask/outstat.c index 38fabe3c..fc33201f 100644 --- a/mbtask/outstat.c +++ b/mbtask/outstat.c @@ -4,7 +4,7 @@ * Purpose ...............: mbtask - Scan mail outbound status * ***************************************************************************** - * Copyright (C) 1997-2001 + * Copyright (C) 1997-2002 * * Michiel Broek FIDO: 2:280/2802 * Beekmansbos 10 diff --git a/mbtask/scanout.c b/mbtask/scanout.c index 3b1dda40..d2101cf7 100644 --- a/mbtask/scanout.c +++ b/mbtask/scanout.c @@ -1,11 +1,10 @@ /***************************************************************************** * - * File ..................: mbtask/scanout.c + * $Id$ * Purpose ...............: Outbound scanning - * Last modification date : 09-Jul-2001 * ***************************************************************************** - * Copyright (C) 1997-2001 + * Copyright (C) 1997-2002 * * Michiel Broek FIDO: 2:280/2802 * Beekmansbos 10 diff --git a/mbtask/scanout.h b/mbtask/scanout.h index b5dcdfc2..9ebccf61 100644 --- a/mbtask/scanout.h +++ b/mbtask/scanout.h @@ -1,6 +1,9 @@ #ifndef SCANOUT_H #define SCANOUT_H +/* $Id$ */ + + #define OUT_PKT 0 #define OUT_DIR 1 #define OUT_FLO 2 diff --git a/mbtask/signame.c b/mbtask/signame.c index 1ccff62f..c049e1cc 100644 --- a/mbtask/signame.c +++ b/mbtask/signame.c @@ -1,11 +1,10 @@ /***************************************************************************** * - * File ..................: signame.c + * $Id$ * Purpose ...............: Signal names - * Last modification date : 24-May-2001 * ***************************************************************************** - * Copyright (C) 1997-2001 + * Copyright (C) 1997-2002 * * Michiel Broek FIDO: 2:280/2802 * Beekmansbos 10 diff --git a/mbtask/signame.h b/mbtask/signame.h index cfeb4e4b..ac36a0f7 100644 --- a/mbtask/signame.h +++ b/mbtask/signame.h @@ -1,6 +1,8 @@ #ifndef _SIGNAME_H #define _SIGNAME_H +/* $Id$ */ + char SigName[32][16]; diff --git a/mbtask/taskcomm.c b/mbtask/taskcomm.c index d1f5203b..a4c24d65 100644 --- a/mbtask/taskcomm.c +++ b/mbtask/taskcomm.c @@ -4,7 +4,7 @@ * Purpose ...............: MBSE BBS Daemon * ***************************************************************************** - * Copyright (C) 1997-2001 + * Copyright (C) 1997-2002 * * Michiel Broek FIDO: 2:280/2802 * Beekmansbos 10 diff --git a/mbtask/taskcomm.h b/mbtask/taskcomm.h index 50c17b34..659eb9df 100644 --- a/mbtask/taskcomm.h +++ b/mbtask/taskcomm.h @@ -1,6 +1,9 @@ #ifndef _TASKCOMM_H #define _TASKCOMM_H +/* $Id$ */ + + void do_cmd(char *); #endif diff --git a/mbtask/taskdisk.h b/mbtask/taskdisk.h index 64617450..6c565fbb 100644 --- a/mbtask/taskdisk.h +++ b/mbtask/taskdisk.h @@ -1,6 +1,9 @@ #ifndef _TASKDISK_H #define _TASKDISK_H +/* $Id$ */ + + char *get_diskstat(void); /* Get disk status */ diff --git a/mbtask/taskinfo.c b/mbtask/taskinfo.c index b183bb9b..ff8de314 100644 --- a/mbtask/taskinfo.c +++ b/mbtask/taskinfo.c @@ -1,11 +1,10 @@ /***************************************************************************** * - * File ..................: mbtask/taskinfo.c + * $Id$ * Purpose ...............: Give system information - * Last modification date : 26-Oct-2001 * ***************************************************************************** - * Copyright (C) 1997-2001 + * Copyright (C) 1997-2002 * * Michiel Broek FIDO: 2:280/2802 * Beekmansbos 10 diff --git a/mbtask/taskinfo.h b/mbtask/taskinfo.h index a366cf06..deeb3a5f 100644 --- a/mbtask/taskinfo.h +++ b/mbtask/taskinfo.h @@ -1,6 +1,9 @@ #ifndef _TASKINFO_H #define _TASKINFO_H +/* $Id$ */ + + char *get_sysinfo(void); /* Get System Info */ char *get_lastcallercount(void); /* Get Lastcallers count */ char *get_lastcallerrec(int); /* Get Lastcaller record */ diff --git a/mbtask/taskregs.h b/mbtask/taskregs.h index 1f2eb232..3dae0e7d 100644 --- a/mbtask/taskregs.h +++ b/mbtask/taskregs.h @@ -1,6 +1,9 @@ #ifndef _TASKREGS_H #define _TASKREGS_H +/* $Id$ */ + + #define MAXCLIENT 100