From: giwoong.kim Date: Fri, 31 Aug 2012 07:31:34 +0000 (+0900) Subject: [Title] shutdown gracefully when skin process is terminated X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.1~1485 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c06cfdd2ac311358a5ebd343e202ccca7ef8fb6d;p=sdk%2Femulator%2Fqemu.git [Title] shutdown gracefully when skin process is terminated [Type] enhancement [Module] Emulator / skin [Priority] major [Jira#] [Redmine#] [Problem] [Cause] [Solution] [TestCase] --- diff --git a/tizen/src/skin/maruskin_client.c b/tizen/src/skin/maruskin_client.c index 2af4546058..351cb56f37 100644 --- a/tizen/src/skin/maruskin_client.c +++ b/tizen/src/skin/maruskin_client.c @@ -170,9 +170,9 @@ static void* run_skin_client(void* arg) INFO("child return value : %d\n", dwRet); if (dwRet != 0) { - //child process is terminated with some problem. - //so qemu process will terminate, too. immediately. - exit(1); + /* child process is terminated with some problem. + So qemu process will terminate, too. immediately. */ + shutdown_qemu_gracefully(); } if (CloseHandle(pi.hProcess) != 0) { @@ -196,9 +196,9 @@ static void* run_skin_client(void* arg) INFO("child return value : %d\n", ret); if (ret != 0) { - //child process is terminated with some problem. - //so qemu process will terminate, too. immediately. - exit(1); + /* child process is terminated with some problem. + So qemu process will terminate, too. immediately. */ + shutdown_qemu_gracefully(); } } diff --git a/tizen/src/skin/maruskin_server.c b/tizen/src/skin/maruskin_server.c index 0f82ce8849..c4591290f2 100644 --- a/tizen/src/skin/maruskin_server.c +++ b/tizen/src/skin/maruskin_server.c @@ -230,6 +230,7 @@ void shutdown_skin_server( void ) { #else close( client_sock ); #endif + client_sock = 0; } if ( close_server_socket ) { @@ -240,6 +241,7 @@ void shutdown_skin_server( void ) { #else close( server_sock ); #endif + server_sock = 0; } } @@ -841,6 +843,7 @@ cleanup: #else close( server_sock ); #endif + server_sock = 0; } if( shutdown_qmu ) { @@ -1091,6 +1094,7 @@ static void* do_heart_beat( void* args ) { #else close( client_sock ); #endif + client_sock = 0; } start_skin_client( skin_argc, skin_argv ); @@ -1114,6 +1118,7 @@ static void* do_heart_beat( void* args ) { #else close( client_sock ); #endif + client_sock = 0; } stop_server = 1; @@ -1123,6 +1128,7 @@ static void* do_heart_beat( void* args ) { #else close( server_sock ); #endif + server_sock = 0; } ERR( "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n" );