From 94e734628e45029dd5f1ff8b67bb97940647ef62 Mon Sep 17 00:00:00 2001 From: Son Hyunjun Date: Mon, 16 Apr 2012 16:47:37 +0900 Subject: [PATCH] [Title] skip restarting skin process [Type] Bugfix [Module] Skin [Priority] Minor [CQ#] [Redmine#] [Problem] abnormal behavior killing a skin process in Windows [Cause] [Solution] prevent restarting skin process Change-Id: I73eda8fa69534ec879def39c82fdc2f8d8748740 --- tizen/src/Makefile.tizen | 2 +- tizen/src/maru_signal.c | 117 --------------------------------------- tizen/src/maru_signal.h | 55 ------------------ tizen/src/skin/maruskin_server.c | 5 ++ 4 files changed, 6 insertions(+), 173 deletions(-) delete mode 100644 tizen/src/maru_signal.c delete mode 100644 tizen/src/maru_signal.h diff --git a/tizen/src/Makefile.tizen b/tizen/src/Makefile.tizen index 3d84b14..a39dd12 100755 --- a/tizen/src/Makefile.tizen +++ b/tizen/src/Makefile.tizen @@ -54,7 +54,7 @@ endif #($(TARGET_ARCH), i386) endif #CONFIG_WIN32 # maru loader -obj-y += emulator.o emul_state.o option.o maru_signal.o +obj-y += emulator.o emul_state.o option.o # maru display obj-y += maru_sdl.o sdl_rotate.o maru_finger.o diff --git a/tizen/src/maru_signal.c b/tizen/src/maru_signal.c deleted file mode 100644 index 81435c7..0000000 --- a/tizen/src/maru_signal.c +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Emulator signal handler - * - * Copyright (C) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * DoHyung Hong - * SeokYeon Hwang - * HyunJun Son - * SangJin Kim - * MunKyu Im - * KiTae Kim - * JinHyung Jo - * SungMin Ha - * JiHye Kim - * GiWoong Kim - * YeongKyoon Lee - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Contributors: - * - S-Core Co., Ltd - * - */ - -#include "maru_signal.h" -#include "debug_ch.h" -#ifndef _WIN32 -#include -#include -#endif - -MULTI_DEBUG_CHANNEL(qemu, emulsignal); - - -static sigset_t cur_sigset, old_sigset; - -int sig_block(void) -{ -#ifndef _WIN32 - sigfillset (&cur_sigset); - - if (sigprocmask (SIG_BLOCK, &cur_sigset, &old_sigset) < 0) { - ERR( "sigprocmask error \n"); - } -#endif - return 0; - -} - -int sig_unblock(void) -{ -#ifndef _WIN32 - sigfillset (&cur_sigset); - - if (sigprocmask (SIG_SETMASK, &old_sigset, NULL) < 0) { - ERR( "sigprocmask error \n"); - } -#endif - return 0; -} - -void sig_handler (int signo) -{ -#ifndef _WIN32 - sigset_t sigset, oldset; - - TRACE("signo %d happens\n", signo); - switch (signo) { - case SIGINT: - case SIGQUIT: - case SIGTERM: - sigfillset (&sigset); - - if (sigprocmask (SIG_BLOCK, &sigset, &oldset) < 0) { - ERR( "sigprocmask %d error \n", signo); - //exit_emulator(); - } - - if (sigprocmask (SIG_SETMASK, &oldset, NULL) < 0) { - ERR( "sigprocmask error \n"); - } - - //exit_emulator(); - exit(0); - break; - - default: - break; - } -#endif -} - -int register_sig_handler(void) -{ -#ifndef _WIN32 - signal (SIGINT, sig_handler); - signal (SIGQUIT, sig_handler); - signal (SIGTERM, sig_handler); -#endif - TRACE( "resist sig handler\n"); - - return 0; -} - diff --git a/tizen/src/maru_signal.h b/tizen/src/maru_signal.h deleted file mode 100644 index ec9cf57..0000000 --- a/tizen/src/maru_signal.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Emulator signal handler - * - * Copyright (C) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * DoHyung Hong - * SeokYeon Hwang - * HyunJun Son - * SangJin Kim - * MunKyu Im - * KiTae Kim - * JinHyung Jo - * SungMin Ha - * JiHye Kim - * GiWoong Kim - * YeongKyoon Lee - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Contributors: - * - S-Core Co., Ltd - * - */ - - -#ifndef __MARU_SIGNAL_H__ -#define __MARU_SIGNAL_H__ - -#include -#include -#include -#ifndef _WIN32 -#include -#endif - - -int sig_block(void); -int sig_unblock(void); -void sig_handler (int signo); -int register_sig_handler(void); - -#endif /* __MARU_SIGNAL_H__ */ diff --git a/tizen/src/skin/maruskin_server.c b/tizen/src/skin/maruskin_server.c index 19e339c..975b982 100644 --- a/tizen/src/skin/maruskin_server.c +++ b/tizen/src/skin/maruskin_server.c @@ -65,7 +65,12 @@ MULTI_DEBUG_CHANNEL( qemu, skin_server ); #define HEART_BEAT_INTERVAL 1 #define HEART_BEAT_FAIL_COUNT 5 #define HEART_BEAT_EXPIRE_COUNT 5 + +#if 0 // do not restarting skin process ( prevent from abnormal behavior killing a skin process in Windows ) #define RESTART_CLIENT_MAX_COUNT 1 +#else +#define RESTART_CLIENT_MAX_COUNT 0 +#endif #define PORT_RETRY_COUNT 50 -- 2.7.4