diff options
author | Lee Chang Yeon <cyeon.lee@samsung.com> | 2014-04-08 19:25:34 +0900 |
---|---|---|
committer | Lee Chang Yeon <cyeon.lee@samsung.com> | 2014-04-08 19:25:34 +0900 |
commit | d5a674d26d1b4ed377fe98c403f77f3f21bbb473 (patch) | |
tree | bf5b9e185e8663c28bbe614ff72f96ad3119e4da /launchd/privileged_startx/server.c | |
parent | 1d888804982d06910f10c1b6a9b29e7b9a23f550 (diff) | |
download | xinit-d5a674d26d1b4ed377fe98c403f77f3f21bbb473.tar.gz xinit-d5a674d26d1b4ed377fe98c403f77f3f21bbb473.tar.bz2 xinit-d5a674d26d1b4ed377fe98c403f77f3f21bbb473.zip |
Imported Upstream version 1.3.3upstream/1.3.3upstream
Diffstat (limited to 'launchd/privileged_startx/server.c')
-rw-r--r-- | launchd/privileged_startx/server.c | 14 |
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); } |