Handle widget abnormal exit 74/131674/7
authorHwankyu Jhun <h.jhun@samsung.com>
Wed, 31 May 2017 02:35:49 +0000 (11:35 +0900)
committerHwanKyu Jhun <h.jhun@samsung.com>
Wed, 31 May 2017 23:57:07 +0000 (23:57 +0000)
- Add a new API to notify normal exit
- Add a new definition (AUL_K_WIDGET_FAULT)

Requires:
 - https://review.tizen.org/gerrit/#/c/131685/ [amd]
 - https://review.tizen.org/gerrit/#/c/131676/ [appcore-widget]
 - https://review.tizen.org/gerrit/#/c/131692/ [widget-service]
 - https://review.tizen.org/gerrit/#/c/131695/ [widget-viewer]

Change-Id: I7b6d208c72eb9cc638a98636b9fffbfe0547d04a
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
include/aul.h
include/aul_cmd.h
src/widget.c

index 1b4e183..b0041b4 100644 (file)
@@ -272,6 +272,8 @@ typedef enum aul_widget_instance_event {
 #define AUL_K_PARENT_APPID     "__AUL_PARENT_APPID__"
 /** AUL internal private key */
 #define AUL_K_CHILD_APPID      "__AUL_CHILD_APPID__"
+/** AUL internal private key */
+#define AUL_K_WIDGET_FAULT     "__AUL_WIDGET_FAULT__"
 
 
 /**
@@ -3050,6 +3052,11 @@ int aul_resume_app_by_instance_id_for_uid(const char *appid,
  */
 int aul_ignore_app_status(status_listen_h handle);
 
+/**
+ * This API is only for Appfw internally.
+ */
+int aul_widget_notify_exit(void);
+
 #ifdef __cplusplus
        }
 #endif
index 07271f7..5b3905b 100644 (file)
@@ -121,6 +121,7 @@ enum app_cmd {
 
        APP_WINDOW_DETACH = 91,
        APP_START_RES_ASYNC = 92,
+       WIDGET_NOTIFY_EXIT = 93,
 
        APP_CMD_MAX
 };
index 6ed99d4..da0cf52 100644 (file)
@@ -264,3 +264,8 @@ API int aul_widget_instance_count(const char *widget_id)
        return ret;
 }
 
+API int aul_widget_notify_exit(void)
+{
+       return aul_sock_send_raw(AUL_UTIL_PID, getuid(),
+                       WIDGET_NOTIFY_EXIT, NULL, 0, AUL_SOCK_NOREPLY);
+}