mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 15:30:14 +00:00
logging-enhancements-20011009
The bosserver now logs the exit status of processes under its control. ==================== This delta was composed from multiple commits as part of the CVS->Git migration. The checkin message with each commit was inconsistent. The following are the additional commit messages. ==================== Messages generated as the result of assertion failures now include timestamps.
This commit is contained in:
parent
3c72f0ab25
commit
342ae52c81
@ -528,6 +528,12 @@ static int bproc() {
|
|||||||
RememberProcName(tp);
|
RememberProcName(tp);
|
||||||
tb->errorSignal = 0;
|
tb->errorSignal = 0;
|
||||||
}
|
}
|
||||||
|
if (tp->coreName)
|
||||||
|
bozo_Log("%s:%s exited with code %d",
|
||||||
|
tb->name, tp->coreName, tp->lastExit);
|
||||||
|
else
|
||||||
|
bozo_Log("%s exited with code %d",
|
||||||
|
tb->name, tp->lastExit);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* Signal occurred, perhaps spurious due to shutdown request.
|
/* Signal occurred, perhaps spurious due to shutdown request.
|
||||||
@ -542,6 +548,14 @@ static int bproc() {
|
|||||||
tb->lastErrorExit = FT_ApproxTime();
|
tb->lastErrorExit = FT_ApproxTime();
|
||||||
RememberProcName(tp);
|
RememberProcName(tp);
|
||||||
}
|
}
|
||||||
|
if (tp->coreName)
|
||||||
|
bozo_Log("%s:%s exited on signal %d%s",
|
||||||
|
tb->name, tp->coreName, tp->lastSignal,
|
||||||
|
WCOREDUMP(status) ? " (core dumped)" : "");
|
||||||
|
else
|
||||||
|
bozo_Log("%s exited on signal %d%s",
|
||||||
|
tb->name, tp->lastSignal,
|
||||||
|
WCOREDUMP(status) ? " (core dumped)" : "");
|
||||||
SaveCore(tb, tp);
|
SaveCore(tb, tp);
|
||||||
}
|
}
|
||||||
tb->lastAnyExit = FT_ApproxTime();
|
tb->lastAnyExit = FT_ApproxTime();
|
||||||
|
@ -26,7 +26,14 @@ void afs_NTAbort(void)
|
|||||||
|
|
||||||
void AssertionFailed(char *file, int line)
|
void AssertionFailed(char *file, int line)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "Assertion failed! file %s, line %d.\n", file, line);
|
char tdate[26];
|
||||||
|
time_t when;
|
||||||
|
|
||||||
|
time(&when);
|
||||||
|
strcpy(tdate, ctime(&when));
|
||||||
|
tdate[24] = '0';
|
||||||
|
fprintf(stderr, "%s: Assertion failed! file %s, line %d.\n",
|
||||||
|
tdate, file, line);
|
||||||
fflush(stderr);
|
fflush(stderr);
|
||||||
#ifdef AFS_NT40_ENV
|
#ifdef AFS_NT40_ENV
|
||||||
afs_NTAbort();
|
afs_NTAbort();
|
||||||
|
Loading…
Reference in New Issue
Block a user