sbsv2/raptor/util/talon/process.c
branchfix
changeset 237 dd11681bd6f3
parent 3 e1eecf4d390d
child 240 fbc6a8ad3957
equal deleted inserted replaced
236:a2dc04c8e649 237:dd11681bd6f3
   174 	{
   174 	{
   175 		p->causeofdeath = PROC_NORMALDEATH;
   175 		p->causeofdeath = PROC_NORMALDEATH;
   176 		p->returncode = WEXITSTATUS(status);
   176 		p->returncode = WEXITSTATUS(status);
   177 		DEBUG(("process exited normally \n"));
   177 		DEBUG(("process exited normally \n"));
   178 	} else {
   178 	} else {
   179 		p->causeofdeath = PROC_SOMEODDDEATH;
   179 		if (p->causeofdeath == PROC_TIMEOUTDEATH)
   180 		if (WIFSIGNALED(status))
       
   181 			p->returncode = WTERMSIG(status);
       
   182 		else
       
   183 			p->returncode = 128;
   180 			p->returncode = 128;
       
   181 		else {	
       
   182 			p->causeofdeath = PROC_SOMEODDDEATH;
       
   183 			if (WIFSIGNALED(status))
       
   184 				p->returncode = WTERMSIG(status);
       
   185 			else
       
   186 				p->returncode = 128;
       
   187 		}
   184 		DEBUG(("process terminated \n"));
   188 		DEBUG(("process terminated \n"));
   185 	}
   189 	}
   186 	
   190 	
   187 	return p;
   191 	return p;
   188 }
   192 }