From 3b53d7aecb2f3a729c57f2831a3d4b6e1ff1901f Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Thu, 12 May 2011 20:27:55 -0700 Subject: launchd: Update console redirection to work with libdispatch Signed-off-by: Jeremy Huddleston --- launchd/privileged_startx/Makefile.am | 4 ++-- launchd/privileged_startx/server.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'launchd/privileged_startx') 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 #include +#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; -- cgit v1.2.3