summaryrefslogtreecommitdiff
path: root/launchd/privileged_startx
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
parente6187b0d47722ec364372926d78dfe4e5637bd6c (diff)
launchd: Update console redirection to work with libdispatch
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Diffstat (limited to 'launchd/privileged_startx')
-rw-r--r--launchd/privileged_startx/Makefile.am4
-rw-r--r--launchd/privileged_startx/server.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/launchd/privileged_startx/Makefile.am b/launchd/privileged_startx/Makefile.am
index c7cf0e8..811cbdb 100644
--- a/launchd/privileged_startx/Makefile.am
+++ b/launchd/privileged_startx/Makefile.am
@@ -33,7 +33,7 @@ privstartxdir = $(xinitrcdir)/privileged_startx.d
xinitrc_PROGRAMS = privileged_startx
privstartx_SCRIPTS = 10-tmpdirs 20-font_cache
-AM_CPPFLAGS = -DXINITDIR=\"$(xinitrcdir)\" -DSCRIPTDIR=\"$(privstartxdir)\" -DBINDIR=\"$(bindir)\"
+AM_CPPFLAGS = -I$(srcdir)/.. -DXINITDIR=\"$(xinitrcdir)\" -DSCRIPTDIR=\"$(privstartxdir)\" -DBINDIR=\"$(bindir)\"
CPP_FILES_FLAGS = -DXINITDIR="$(xinitrcdir)" -DSCRIPTDIR="$(privstartxdir)" -DBINDIR="$(bindir)" -DBUNDLE_ID_PREFIX="$(bundleidprefix)"
if TIGER_LAUNCHD
@@ -41,7 +41,7 @@ CPP_FILES_FLAGS += -DTIGER_LAUNCHD
endif
dist_privileged_startx_SOURCES = \
- ../console_redirect.c \
+ $(srcdir)/../console_redirect.c \
server.c \
client.c \
privileged_startx.c
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;