summaryrefslogtreecommitdiff
path: root/launchd/privileged_startx
diff options
context:
space:
mode:
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;