sbsv2/raptor/util/talon/process.c
changeset 13 c327db0664bb
parent 2 39c28ec933dd
equal deleted inserted replaced
12:5e7562f67577 13:c327db0664bb
     1 /*
     1 /*
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of the License "Eclipse Public License v1.0"
     5 * under the terms of the License "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
   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 }