summaryrefslogtreecommitdiff
path: root/launchd/privileged_startx/server.c
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@apple.com>2011-05-12 20:27:55 -0700
committerJeremy Huddleston <jeremyhu@apple.com>2011-05-12 20:27:55 -0700
commit3b53d7aecb2f3a729c57f2831a3d4b6e1ff1901f (patch)
treedc11bd4036d99fb57a1b70ca0d44f653aa8aab1a /launchd/privileged_startx/server.c
parente6187b0d47722ec364372926d78dfe4e5637bd6c (diff)
launchd: Update console redirection to work with libdispatch
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Diffstat (limited to 'launchd/privileged_startx/server.c')
-rw-r--r--launchd/privileged_startx/server.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/launchd/privileged_startx/server.c b/launchd/privileged_startx/server.c
index 99e6b37..cfbb623 100644
--- a/launchd/privileged_startx/server.c
+++ b/launchd/privileged_startx/server.c
@@ -46,6 +46,8 @@
#include <asl.h>
#include <errno.h>
+#include "console_redirect.h"
+
#include "privileged_startx.h"
#include "privileged_startxServer.h"
@@ -77,9 +79,6 @@ struct idle_globals idle_globals;
/* Default script dir */
const char *script_dir = SCRIPTDIR;
-/* console_redirect.c */
-extern int console_redirect(aslclient aslc, aslmsg amsg, int stdout_level, int stderr_level);
-
#ifndef LAUNCH_JOBKEY_MACHSERVICES
static mach_port_t checkin_or_register(char *bname) {
kern_return_t kr;
@@ -144,7 +143,8 @@ int server_main(const char *dir) {
}
aslc = asl_open(labelstr, BUNDLE_ID_PREFIX, ASL_OPT_NO_DELAY);
- (void)console_redirect(aslc, NULL, ASL_LEVEL_INFO, ASL_LEVEL_NOTICE);
+ xi_asl_capture_fd(aslc, NULL, ASL_LEVEL_INFO, STDOUT_FILENO);
+ xi_asl_capture_fd(aslc, NULL, ASL_LEVEL_NOTICE, STDERR_FILENO);
#ifdef LAUNCH_JOBKEY_MACHSERVICES
launch_data_t tmv;