- Fixed an off by one in a message from killfile
- Fixed a nasty reentrency bug in nread.c _ protected devexec.c against the same bug
This commit is contained in:
2
danu.c
2
danu.c
@ -364,7 +364,7 @@ int NewThousand(pDataNumber self)
|
|||||||
if(SCMatchRights(pCon,usMugger))
|
if(SCMatchRights(pCon,usMugger))
|
||||||
{
|
{
|
||||||
iNum = DecrementDataNumber(self);
|
iNum = DecrementDataNumber(self);
|
||||||
snprintf(pBueffel,511,"Data file %d killed", iNum);
|
snprintf(pBueffel,511,"Data file %d killed", iNum+1);
|
||||||
SCWrite(pCon,pBueffel,eWarning);
|
SCWrite(pCon,pBueffel,eWarning);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
17
devexec.c
17
devexec.c
@ -170,6 +170,7 @@ typedef struct {
|
|||||||
pICallBack pCall;
|
pICallBack pCall;
|
||||||
time_t lastRun;
|
time_t lastRun;
|
||||||
int paused;
|
int paused;
|
||||||
|
int taskRunning;
|
||||||
} ExeList;
|
} ExeList;
|
||||||
|
|
||||||
static pExeList pExecutor = NULL;
|
static pExeList pExecutor = NULL;
|
||||||
@ -1364,8 +1365,20 @@ static int testFinish(pExeList self){
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
self->lastRun = time(NULL);
|
if(self->taskRunning == 1){
|
||||||
|
printf("DevexecTask reentrant protection triggered\n");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
* CheckExeList may cause waits and thus reentrant calls to
|
||||||
|
* this. Which can cause trouble
|
||||||
|
*/
|
||||||
|
self->taskRunning = 1;
|
||||||
iRet = CheckExeList(self);
|
iRet = CheckExeList(self);
|
||||||
|
self->taskRunning = 0;
|
||||||
|
|
||||||
|
|
||||||
|
self->lastRun = time(NULL);
|
||||||
switch(iRet)
|
switch(iRet)
|
||||||
{
|
{
|
||||||
case -1: /* some problem */
|
case -1: /* some problem */
|
||||||
@ -1374,7 +1387,9 @@ static int testFinish(pExeList self){
|
|||||||
{
|
{
|
||||||
if(iInterrupt > 1)
|
if(iInterrupt > 1)
|
||||||
{
|
{
|
||||||
|
self->taskRunning = 1;
|
||||||
StopExe(self,"all");
|
StopExe(self,"all");
|
||||||
|
self->taskRunning = 0;
|
||||||
}
|
}
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf("DevExecTask found an error\n");
|
printf("DevExecTask found an error\n");
|
||||||
|
2
nread.c
2
nread.c
@ -265,7 +265,7 @@ extern int VerifyChannel(mkChannel *self); /* defined in network.c */
|
|||||||
"ERROR: insufficient privilege to invoke Interrupt",
|
"ERROR: insufficient privilege to invoke Interrupt",
|
||||||
eError);
|
eError);
|
||||||
}
|
}
|
||||||
return 1;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* split into command lines
|
/* split into command lines
|
||||||
|
Reference in New Issue
Block a user