int kill_app(const char *binary_path)
{
+#ifdef PROFILE_TV
+ /* usage of SIGTERM signal isn't possible on TV */
+ enum { FINISH_SIG = SIGKILL };
+#else /* PROFILE_TV */
+ enum { FINISH_SIG = SIGTERM };
+#endif /* PROFILE_TV */
+
pid_t pkg_pid;
char alter_bin_path[PATH_MAX];
- LOGI("kill %s (%d)\n", binary_path, SIGKILL);
+ LOGI("kill %s (%d)\n", binary_path, FINISH_SIG);
pkg_pid = get_pid_by_path(binary_path);
}
if (pkg_pid != 0) {
- if (kill(pkg_pid, SIGTERM) == -1) {
+ if (kill(pkg_pid, FINISH_SIG) == -1) {
GETSTRERROR(errno, err_buf);
- LOGE("cannot kill %d -%d errno<%s>\n", pkg_pid, SIGKILL,
+ LOGE("cannot kill %d -%d errno<%s>\n", pkg_pid, FINISH_SIG,
err_buf);
return -1;
} else {
// returns control immediately after send signal
// without it app_launch returns err on start app
sleep(1);
- LOGI("killed %d -%d\n", pkg_pid, SIGKILL);
+ LOGI("killed %d -%d\n", pkg_pid, FINISH_SIG);
}
} else
LOGI("cannot kill <%s>; process not found\n", binary_path);
SWAP_BUILD_CMD+=" CALL_MNGR=y"
%endif
-%if "%{?tizen_profile_name}" != "tv"
+%if "%{?tizen_profile_name}" == "tv"
+SWAP_BUILD_CMD+=" PROFILE_TV=y"
+%else
SWAP_BUILD_CMD+=" WSP_SUPPORT=y"
%endif