Better mbtask logging
This commit is contained in:
parent
893f84ebc5
commit
a14e540cd4
@ -33,6 +33,7 @@ v0.37.5 12-Jul-2003
|
||||
Now uses standard locking in ~/var/run
|
||||
When idle, it now reports the time to the next event to be
|
||||
seen in mbmon menu 1.
|
||||
Remove some semafore debug messages.
|
||||
|
||||
mbmon:
|
||||
Added program locking, only one mbmon can run at the same time
|
||||
|
@ -600,10 +600,11 @@ int checktasks(int onsig)
|
||||
Syslog('+', "Task %s is ready", task[i].name);
|
||||
} else if (WIFSIGNALED(task[i].status)) {
|
||||
rc = WTERMSIG(task[i].status);
|
||||
if (rc <= 31)
|
||||
Syslog('+', "Task %s terminated on signal %s (%d)", task[i].name, SigName[rc], rc);
|
||||
else
|
||||
Syslog('+', "Task %s terminated with error nr %d", task[i].name, rc);
|
||||
/*
|
||||
* Here we don't report an error number, on FreeBSD WIFSIGNALED
|
||||
* seems true while there's nothing wrong.
|
||||
*/
|
||||
Syslog('+', "Task %s terminated", task[i].name);
|
||||
} else if (WIFSTOPPED(task[i].status)) {
|
||||
rc = WSTOPSIG(task[i].status);
|
||||
Syslog('+', "Task %s stopped on signal %s (%d)", task[i].name, SigName[rc], rc);
|
||||
|
@ -113,7 +113,7 @@ void load_ports()
|
||||
FILE *fp;
|
||||
pp_list new;
|
||||
int stdflag;
|
||||
char *p, *q;
|
||||
char *p, *q, *capflags;
|
||||
nodelist_modem **tmpm;
|
||||
|
||||
tidy_portlist(&pl);
|
||||
@ -136,6 +136,7 @@ void load_ports()
|
||||
memset(&new, 0, sizeof(new));
|
||||
strncpy(new.tty, ttyinfo.tty, 6);
|
||||
|
||||
capflags = xstrcpy((char *)"flags:");
|
||||
stdflag = TRUE;
|
||||
q = xstrcpy(ttyinfo.flags);
|
||||
for (p = q; p; p = q) {
|
||||
@ -145,16 +146,24 @@ void load_ports()
|
||||
stdflag = FALSE;
|
||||
} else {
|
||||
for (tmpm = &nl_pots; *tmpm; tmpm=&((*tmpm)->next))
|
||||
if (strcasecmp(p, (*tmpm)->name) == 0)
|
||||
if (strcasecmp(p, (*tmpm)->name) == 0) {
|
||||
new.mflags |= (*tmpm)->value;
|
||||
capflags = xstrcat(capflags, (char *)" ");
|
||||
capflags = xstrcat(capflags, (*tmpm)->name);
|
||||
}
|
||||
for (tmpm = &nl_isdn; *tmpm; tmpm=&((*tmpm)->next))
|
||||
if (strcasecmp(p, (*tmpm)->name) == 0)
|
||||
if (strcasecmp(p, (*tmpm)->name) == 0) {
|
||||
new.dflags |= (*tmpm)->value;
|
||||
capflags = xstrcat(capflags, (char *)" ");
|
||||
capflags = xstrcat(capflags, (*tmpm)->name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Syslog('p', "port %s modem %08lx ISDN %08lx", new.tty, new.mflags, new.dflags);
|
||||
Syslog('+', "Found line %s, %s", new.tty, capflags);
|
||||
fill_portlist(&pl, &new);
|
||||
if (capflags)
|
||||
free(capflags);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -340,8 +340,6 @@ char *getseq(void)
|
||||
|
||||
int sem_set(char *sem, int value)
|
||||
{
|
||||
Syslog('s', "%s semafore \"%s\"", value?"Set":"Clear", sem);
|
||||
|
||||
if (!strcmp(sem, "scanout")) {
|
||||
s_scanout = value;
|
||||
if (value)
|
||||
@ -406,7 +404,6 @@ char *sem_status(char *data)
|
||||
}
|
||||
|
||||
sprintf(buf, "100:1,%s;", value ? "1":"0");
|
||||
Syslog('s', "Check semafore \"%s\": %s present", sem, value?"is":"not");
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user