glib/glibbackend/src/checkforchildexited.cpp
changeset 0 e4d67989cc36
equal deleted inserted replaced
-1:000000000000 0:e4d67989cc36
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #include <e32std.h>
       
    21 #include <e32base.h>
       
    22 
       
    23 extern "C" EXPORT_C int check_for_child_exited (TInt aHandle)
       
    24 {
       
    25 	RProcess iProcess;
       
    26 	if( iProcess.Open(aHandle) < 0)
       
    27 		return FALSE;
       
    28 	
       
    29 	TExitType exit_type = iProcess.ExitType();	
       
    30 	if(exit_type == EExitTerminate || exit_type == EExitKill || exit_type == EExitPanic)
       
    31 		return TRUE;
       
    32 	else
       
    33 		return FALSE;
       
    34 }