summaryrefslogtreecommitdiff
path: root/launchd/privileged_startx/server.c
diff options
context:
space:
mode:
authorChangyeon Lee <cyeon.lee@samsung.com>2014-04-17 05:39:58 (GMT)
committerChangyeon Lee <cyeon.lee@samsung.com>2014-04-17 05:46:41 (GMT)
commitba6c5bef58d88aab1584107543b81a2930451a1f (patch)
treeaa0e1ab02744850352e42ecbd629ad5a8f5c98d8 /launchd/privileged_startx/server.c
parentd7fbb5c11b41bb71b9173daea2f48d855bc61316 (diff)
parent8d5e38de0819168970669f24379c21338616184e (diff)
downloadxinit-tizen_3.0.2015.q1_common.zip
xinit-tizen_3.0.2015.q1_common.tar.gz
xinit-tizen_3.0.2015.q1_common.tar.bz2
Change-Id: Ibe6f53547397a2beaf4747ef8a442b43e41544fb Signed-off-by: Changyeon Lee <cyeon.lee@samsung.com>
Diffstat (limited to 'launchd/privileged_startx/server.c')
-rw-r--r--launchd/privileged_startx/server.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/launchd/privileged_startx/server.c b/launchd/privileged_startx/server.c
index cfbb623..a93cae3 100644
--- a/launchd/privileged_startx/server.c
+++ b/launchd/privileged_startx/server.c
@@ -125,9 +125,19 @@ int server_main(const char *dir) {
aslclient aslc;
checkin = launch_data_new_string(LAUNCH_KEY_CHECKIN);
+ if (!checkin) {
+ asl_log(NULL, NULL, ASL_LEVEL_ERR, "unable to create launchd checkin string");
+ exit(EXIT_FAILURE);
+ }
+
config = launch_msg(checkin);
- if (!config || launch_data_get_type(config) == LAUNCH_DATA_ERRNO) {
- asl_log(NULL, NULL, ASL_LEVEL_ERR, "launchd checkin failed");
+ if (!config) {
+ asl_log(NULL, NULL, ASL_LEVEL_ERR, "could not send a message to launchd");
+ exit(EXIT_FAILURE);
+ }
+
+ if (launch_data_get_type(config) == LAUNCH_DATA_ERRNO) {
+ asl_log(NULL, NULL, ASL_LEVEL_ERR, "launchd checkin failed eith error: %d %s", launch_data_get_errno(config), strerror(launch_data_get_errno(config)));
exit(EXIT_FAILURE);
}