Merge remote-tracking branch 'jeremyhu/master'
This commit is contained in:
commit
4d62646142
|
@ -2158,7 +2158,7 @@ if test "x$XQUARTZ" = xyes; then
|
||||||
AC_DEFINE(XQUARTZ,1,[Have Quartz])
|
AC_DEFINE(XQUARTZ,1,[Have Quartz])
|
||||||
AC_DEFINE(ROOTLESS,1,[Build Rootless code])
|
AC_DEFINE(ROOTLESS,1,[Build Rootless code])
|
||||||
|
|
||||||
XQUARTZ_LIBS="$FB_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB"
|
XQUARTZ_LIBS="$FB_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $PRESENT_LIB"
|
||||||
AC_SUBST([XQUARTZ_LIBS])
|
AC_SUBST([XQUARTZ_LIBS])
|
||||||
|
|
||||||
AC_CHECK_LIB([Xplugin],[xp_init],[:])
|
AC_CHECK_LIB([Xplugin],[xp_init],[:])
|
||||||
|
|
|
@ -347,7 +347,7 @@ extern char *bundle_id_prefix;
|
||||||
const char *newargv[4];
|
const char *newargv[4];
|
||||||
char buf[128];
|
char buf[128];
|
||||||
char *s;
|
char *s;
|
||||||
#if 0 && MAC_OS_X_VERSION_MAX_ALLOWED >= 1080
|
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1080
|
||||||
int stdout_pipe[2];
|
int stdout_pipe[2];
|
||||||
int stderr_pipe[2];
|
int stderr_pipe[2];
|
||||||
#endif
|
#endif
|
||||||
|
@ -363,7 +363,7 @@ extern char *bundle_id_prefix;
|
||||||
setenv("DISPLAY", buf, TRUE);
|
setenv("DISPLAY", buf, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0 && MAC_OS_X_VERSION_MAX_ALLOWED >= 1080
|
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1080
|
||||||
if (asl_log_descriptor) {
|
if (asl_log_descriptor) {
|
||||||
char *asl_sender;
|
char *asl_sender;
|
||||||
aslmsg amsg = asl_new(ASL_TYPE_MSG);
|
aslmsg amsg = asl_new(ASL_TYPE_MSG);
|
||||||
|
@ -413,7 +413,7 @@ extern char *bundle_id_prefix;
|
||||||
_exit(1);
|
_exit(1);
|
||||||
|
|
||||||
case 0: /* child2 */
|
case 0: /* child2 */
|
||||||
#if 0 && MAC_OS_X_VERSION_MAX_ALLOWED >= 1080
|
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1080
|
||||||
if (asl_log_descriptor) {
|
if (asl_log_descriptor) {
|
||||||
/* Replace our stdout/stderr */
|
/* Replace our stdout/stderr */
|
||||||
dup2(stdout_pipe[1], STDOUT_FILENO);
|
dup2(stdout_pipe[1], STDOUT_FILENO);
|
||||||
|
@ -442,7 +442,7 @@ extern char *bundle_id_prefix;
|
||||||
waitpid(child1, &status, 0);
|
waitpid(child1, &status, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0 && MAC_OS_X_VERSION_MAX_ALLOWED >= 1080
|
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1080
|
||||||
if (asl_log_descriptor) {
|
if (asl_log_descriptor) {
|
||||||
/* Close the write ends of the pipe */
|
/* Close the write ends of the pipe */
|
||||||
close(stdout_pipe[1]);
|
close(stdout_pipe[1]);
|
||||||
|
|
13
os/osinit.c
13
os/osinit.c
|
@ -213,10 +213,18 @@ OsInit(void)
|
||||||
dlinfo(RTLD_SELF, RTLD_DI_SETSIGNAL, &failure_signal);
|
dlinfo(RTLD_SELF, RTLD_DI_SETSIGNAL, &failure_signal);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(__CYGWIN__)
|
#if !defined(XQUARTZ) /* STDIN is already /dev/null and STDOUT/STDERR is managed by console_redirect.c */
|
||||||
|
# if defined(__APPLE__)
|
||||||
|
int devnullfd = open(devnull, O_RDWR, 0);
|
||||||
|
assert(devnullfd > 2);
|
||||||
|
|
||||||
|
dup2(devnullfd, STDIN_FILENO);
|
||||||
|
dup2(devnullfd, STDOUT_FILENO);
|
||||||
|
close(devnullfd);
|
||||||
|
# elif !defined(__CYGWIN__)
|
||||||
fclose(stdin);
|
fclose(stdin);
|
||||||
fclose(stdout);
|
fclose(stdout);
|
||||||
#endif
|
# endif
|
||||||
/*
|
/*
|
||||||
* If a write of zero bytes to stderr returns non-zero, i.e. -1,
|
* If a write of zero bytes to stderr returns non-zero, i.e. -1,
|
||||||
* then writing to stderr failed, and we'll write somewhere else
|
* then writing to stderr failed, and we'll write somewhere else
|
||||||
|
@ -250,6 +258,7 @@ OsInit(void)
|
||||||
setlinebuf(stderr);
|
setlinebuf(stderr);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
#endif /* !XQUARTZ */
|
||||||
|
|
||||||
#if !defined(WIN32) || defined(__CYGWIN__)
|
#if !defined(WIN32) || defined(__CYGWIN__)
|
||||||
if (getpgrp() == 0)
|
if (getpgrp() == 0)
|
||||||
|
|
Loading…
Reference in New Issue