Change-Id: I9fadc1fc5a8bcbfefadfbd8e4cab0ec5d78f1e35
Signed-off-by: manish.r <manish.r@samsung.com>
if (pid == 0) {
sdb_close(s[0]); //close the parent fd
+ exit_cleanup_required = 0;
sync_read_label_notify(s[1]);
_exit(0);
} else if (pid > 0) {
sdb_close(s[1]);
+ exit_cleanup_required = 1;
char *buffer = malloc(SYNC_DATA_MAX);
if(buffer == NULL) {
#define SDB_LOGCONF_PATH "/tmp/.sdbdlog.conf"
int HOST = 0;
+int exit_cleanup_required = 0;
// sdk user
uid_t g_sdk_user_id;
static void sdb_service_cleanup(void)
{
- unload_sdbd_service_plugin();
+ if (exit_cleanup_required)
+ {
+ unload_sdbd_service_plugin();
+ }
}
#define RESERVE_CAPABILITIES_AFTER_FORK 0
#define DROP_CAPABILITIES_AFTER_FORK 1
+extern int exit_cleanup_required;
#endif