summaryrefslogtreecommitdiff
path: root/launchd/user_startx/launchd_startx.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/user_startx/launchd_startx.c
parente6187b0d47722ec364372926d78dfe4e5637bd6c (diff)
launchd: Update console redirection to work with libdispatch
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Diffstat (limited to 'launchd/user_startx/launchd_startx.c')
-rw-r--r--launchd/user_startx/launchd_startx.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/launchd/user_startx/launchd_startx.c b/launchd/user_startx/launchd_startx.c
index 3d1e03e..e3fae76 100644
--- a/launchd/user_startx/launchd_startx.c
+++ b/launchd/user_startx/launchd_startx.c
@@ -39,8 +39,7 @@
#include <string.h>
#include <stdlib.h>
-/* console_redirect.c */
-extern int console_redirect(aslclient aslc, aslmsg amsg, int stdout_level, int stderr_level);
+#include "console_redirect.h"
int main(int argc, char **argv, char **envp) {
aslclient aslc;
@@ -53,7 +52,9 @@ int main(int argc, char **argv, char **envp) {
}
aslc = asl_open(BUNDLE_ID_PREFIX".startx", 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);
assert(posix_spawnp(&child, argv[1], NULL, NULL, &argv[1], envp) == 0);