1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
$NetBSD: patch-af,v 1.2 2003/10/05 04:25:15 taca Exp $
--- ascyd/sighand.c.orig 2001-06-25 16:28:21.000000000 +0900
+++ ascyd/sighand.c
@@ -60,7 +60,6 @@ void SigUnblock()
void SigHandler(iSig)
int iSig;
{
- CONST char * pMsg;
int codeErr;
/*
@@ -72,17 +71,14 @@ void SigHandler(iSig)
switch (iSig) {
case SIGALRM:
- pMsg = NULL;
codeErr = ERRYS_TIMEOUT;
+ WARNING(codeErr, 0, NULL);
break;
- case SIGHUP:
- case SIGTERM:
default:
codeErr = ERRYS_SIGNAL;
- pMsg = "#%d";
+ WARNING(codeErr, 0, "#%d", iSig);
break;
}
- WARNING(codeErr, 0, pMsg, iSig);
if (SysData.Flags.lock)
SessionUnlock();
@@ -94,7 +90,7 @@ void SigHandler(iSig)
}
#endif
- ErrSetData(codeErr, 0, pMsg, iSig);
+ ErrSetData(codeErr, 0, (codeErr == ERRYS_SIGNAL)? "#%d": NULL, iSig);
Msg2Cli(FAILURE, NULL);
exit(1);
|