- introduced "stopexe run"
- fixed "task ps" to show names containing ':' correctly
This commit is contained in:
13
taskobj.c
13
taskobj.c
@@ -20,7 +20,7 @@ static int ListCmd(pSICSOBJ self, SConnection *pCon, pHdb commandNode,
|
||||
pHdb par[], int nPar)
|
||||
{
|
||||
pDynString result = NULL;
|
||||
char buffer[256], *pDes, *pPtr, name[80], time[80],id[80];
|
||||
char buffer[256], *pDes, *pPtr, name[80], time[80], id[80], gid[80];
|
||||
pTaskHead it = NULL;
|
||||
|
||||
result = CreateDynString(128,128);
|
||||
@@ -35,11 +35,12 @@ static int ListCmd(pSICSOBJ self, SConnection *pCon, pHdb commandNode,
|
||||
for(it = TaskIteratorStart(pServ->pTasker); it != NULL; it = TaskIteratorNext(it)){
|
||||
pDes = TaskDescription(it);
|
||||
if(pDes != NULL){
|
||||
pPtr = stptok(pDes,name,sizeof(name),":");
|
||||
pPtr = stptok(pPtr,time,sizeof(name),":");
|
||||
pPtr = stptok(pPtr,id,sizeof(name),":");
|
||||
snprintf(buffer,sizeof(buffer),"%20s %20s %12s",
|
||||
name,time,id);
|
||||
pPtr = stptok(pDes,name,sizeof(name),"|");
|
||||
pPtr = stptok(pPtr,time,sizeof(time),"|");
|
||||
pPtr = stptok(pPtr,id,sizeof(id),"|");
|
||||
pPtr = stptok(pPtr,gid,sizeof(gid),"|");
|
||||
snprintf(buffer,sizeof(buffer),"%20s %20s %12s %10s",
|
||||
name,time,id,gid);
|
||||
DynStringConcat(result,buffer);
|
||||
DynStringConcatChar(result,'\n');
|
||||
free(pDes);
|
||||
|
||||
Reference in New Issue
Block a user