···11+commit f9786fb5a7e526035699f3d4d6661468ab20e689
22+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
33+Date: Sat Dec 3 14:05:44 2022 -0800
44+55+ xinit 1.4.2
66+77+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
88+99+commit 4f22f255e58fda758fcdd85f8554c4ef274600e8
1010+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
1111+Date: Wed Nov 9 12:22:19 2022 -0800
1212+1313+ man page: Update remote display example from rsh to ssh
1414+1515+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
1616+1717+commit 4e66c0bf2b5751e113ad3aba79891608f7e883e2
1818+Author: Tim Egenton <tegenton@splattim.me>
1919+Date: Tue Dec 7 09:15:18 2021 -0500
2020+2121+ startx: Source XINITRC and XSERVERRC variables
2222+2323+ Fix issue #14
2424+2525+ Check XINITRC and XSERVERRC, if those files do not exist then just use
2626+ ~/.xinitrc and ~/.xserverc as normal.
2727+2828+ Signed-off-by: Tim Egenton <tegenton@splattim.me>
2929+3030+commit 0ea1ec1ed445235cdba9e54e71023d5a82feed6b
3131+Author: Arthur Williams <taaparthur@disroot.org>
3232+Date: Fri Oct 14 20:59:54 2022 -0700
3333+3434+ Don't wait for X to finish starting if it has died
3535+3636+ On my setup, when X first starts there aren't any screens available so
3737+ it immediately dies. Half a second later, screens become available but
3838+ xinit would still be waiting for the dead X process to signal that it
3939+ is ready. It'll take 15s for it to timeout and respawn X.
4040+4141+ This patch makes xinit listen for its child's death and if X dies, it'll
4242+ immediately stop waiting for it to finish starting and attempt to start
4343+ it again.
4444+4545+commit 60389ce90f552d9dfef8facf0efaf48efa59d93c
4646+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
4747+Date: Thu Jul 28 17:30:21 2022 -0700
4848+4949+ gitlab CI: stop requiring Signed-off-by in commits
5050+5151+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
5252+5353+commit d190145b94d00efe8a52c01c1675c308baa335cc
5454+Author: Dominik 'Rathann' Mierzejewski <dominik@greysector.net>
5555+Date: Thu Jun 9 11:21:17 2022 +0200
5656+5757+ stop unsetting DBUS_SESSION_BUS_ADDRESS variable
5858+5959+ It's not necessary as we no longer support running startx from an
6060+ existing X session.
6161+6262+ Fixes #9.
6363+6464+ Signed-off-by: Dominik Mierzejewski <dominik@greysector.net>
6565+6666+commit 6bdce31401e3caf10242f1e8a4855b2c8e90ea13
6767+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
6868+Date: Sun Jun 19 20:09:55 2022 -0700
6969+7070+ darwin: Wait for font_cache to complete to avoid a race with `xset fb=`
7171+7272+ Partially fixes: https://github.com/XQuartz/XQuartz/issues/216
7373+ Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
7474+7575+commit bf1d55c1aeef4d4755e1dbaf05cd625e48780bfb
7676+Author: nia <nia@NetBSD.org>
7777+Date: Thu Apr 7 22:33:28 2022 +0200
7878+7979+ startx: don't attempt to catch SIGKILL
8080+8181+ Most shells ignore attempts to catch SIGKILL. Some, such as NetBSD's
8282+ /bin/sh, print an annoying message helpfully reminding you
8383+ that it isn't possible to catch SIGKILL whenever X starts.
8484+8585+ Signed-off-by: Nia Alarie <nia@NetBSD.org>
8686+8787+commit 71a8997cad602ef0adc9fed110e8a04d2a8fc8dc
8888+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
8989+Date: Mon Dec 6 14:37:17 2021 -0800
9090+9191+ Build xz tarballs instead of bzip2
9292+9393+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
9494+9595+commit 366a03498d51958757cf03aa1ebbdf06db4eb2de
9696+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
9797+Date: Mon Dec 6 14:37:14 2021 -0800
9898+9999+ gitlab CI: add a basic build test
100100+101101+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
102102+103103+commit bdf2af54a800470990a66d11b14589e19fa568ac
104104+Author: Arthur Williams <taaparthur@gmail.com>
105105+Date: Fri Jun 4 21:44:03 2021 -0700
106106+107107+ Remove non-portable grep usage from startx
108108+109109+ startx uses non-portable grep flags (-o). grep isn't even needed for
110110+ this and has been replaced with substring removal.
111111+112112+ Closes #6
113113+114114+commit ae77976adaae9948e3e8d7a673dc88df4e31de46
115115+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
116116+Date: Mon Mar 15 17:37:53 2021 -0700
117117+118118+ darwin: Specify +extension GLX when the user requests IGLX support
119119+120120+ Fixes: https://github.com/XQuartz/XQuartz/issues/54
121121+ Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
122122+123123+commit 8caf10c018d77a097015798b604be8817f526274
124124+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
125125+Date: Wed Mar 10 13:50:09 2021 -0800
126126+127127+ darwin: Ensure we launch the user startx from $HOME
128128+129129+ Fixes: https://github.com/XQuartz/XQuartz/issues/114
130130+ Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
131131+132132+commit db21df4054e3351d14eb7dc1c3216cd23a61cee4
133133+Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
134134+Date: Wed Mar 10 13:46:23 2021 -0800
135135+136136+ darwin: Drop support for macOS 10.7 and earlier
137137+138138+ Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
139139+140140+commit e2430bcb8327682340d985f89ad5137efa2f0d4f
141141+Author: Rickie Schroeder <1187-Gregg16@users.noreply.gitlab.freedesktop.org>
142142+Date: Fri Aug 28 13:34:05 2020 +0000
143143+144144+ startx: use uname -n instead of hostname
145145+146146+ startx calls hostname to obtain the hostname, but this is not defined by POSIX, so not guaranteed to work. The script already does some checks to deal with different hostname implementations on Linux.
147147+148148+ Using uname -n instead fixes this in a portable way.
149149+150150+commit 91d2aba6364ec6685411595ccafea69fe9d20d6c
151151+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
152152+Date: Thu Jul 23 09:26:21 2020 -0700
153153+154154+ Fix spelling/wording issues
155155+156156+ Found by using:
157157+ codespell --builtin clear,rare,usage,informal,code,names
158158+159159+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
160160+161161+commit 4f54d1843a780a71c3be0b56fe2ad2ddfcbaf928
162162+Author: Matt Turner <mattst88@gmail.com>
163163+Date: Sun Mar 8 15:16:36 2020 -0700
164164+165165+ man: Restore non-SCO UNIX bits of the man page
166166+167167+ It looks to me like commit 5268936259c5 (Remove SCO support for
168168+ SHELL_CMD and startx man page.) removed the wrong bits of the man page.
169169+170170+ This commit replaces the SCO UNIX bits of the man page with the non-SCO
171171+ UNIX bits.
172172+173173+ Signed-off-by: Matt Turner <mattst88@gmail.com>
174174+1175commit 9a8b937bcfd84575e13039f316cbcb14c9729df4
2176Author: Alan Coopersmith <alan.coopersmith@oracle.com>
3177Date: Sun Mar 3 11:56:43 2019 -0800
···12971471 when the structure of the component changes. Do not edit defaults.
1298147212991473commit d243b9943879ec2790d65785805aefdfbb64a378
13001300-Author: Rémi Cardona <remi@gentoo.org>
14741474+Author: Rémi Cardona <remi@gentoo.org>
13011475Date: Sat Nov 14 14:51:59 2009 +0100
1302147613031477 xinit 1.2.0
···13431517 Tested-by: Jon TURNEY <jon.turney@dronecode.org.uk>
1344151813451519commit c2a5751175b11d3206805468aae1ddecd02c4a98
13461346-Author: Rémi Cardona <remi@gentoo.org>
15201520+Author: Rémi Cardona <remi@gentoo.org>
13471521Date: Sat Oct 3 11:50:12 2009 +0200
1348152213491523 make XINITDIR configurable at build-time, default is unchanged
···23272501 correctly
2328250223292503commit d731a249d0c1c7f9eb77828c0d6e79cfdaf75589
23302330-Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
25042504+Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
23312505Date: Tue Jul 5 21:12:01 2005 +0000
2332250623332507 Build system for xinit
···10101111 https://lists.x.org/mailman/listinfo/xorg
12121313-The master development code repository can be found at:
1313+The primary development code repository can be found at:
14141515 https://gitlab.freedesktop.org/xorg/app/xinit
1616
+9-8
app/xinit/compile
···11#! /bin/sh
22# Wrapper for compilers which do not understand '-c -o'.
3344-scriptversion=2012-10-14.11; # UTC
44+scriptversion=2018-03-07.03; # UTC
5566-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
66+# Copyright (C) 1999-2021 Free Software Foundation, Inc.
77# Written by Tom Tromey <tromey@cygnus.com>.
88#
99# This program is free software; you can redistribute it and/or modify
···1717# GNU General Public License for more details.
1818#
1919# You should have received a copy of the GNU General Public License
2020-# along with this program. If not, see <http://www.gnu.org/licenses/>.
2020+# along with this program. If not, see <https://www.gnu.org/licenses/>.
21212222# As a special exception to the GNU General Public License, if you
2323# distribute this file as part of a program that contains a
···5353 MINGW*)
5454 file_conv=mingw
5555 ;;
5656- CYGWIN*)
5656+ CYGWIN* | MSYS*)
5757 file_conv=cygwin
5858 ;;
5959 *)
···6767 mingw/*)
6868 file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
6969 ;;
7070- cygwin/*)
7070+ cygwin/* | msys/*)
7171 file=`cygpath -m "$file" || echo "$file"`
7272 ;;
7373 wine/*)
···255255 echo "compile $scriptversion"
256256 exit $?
257257 ;;
258258- cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
258258+ cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
259259+ icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
259260 func_cl_wrapper "$@" # Doesn't return...
260261 ;;
261262esac
···339340# Local Variables:
340341# mode: shell-script
341342# sh-indentation: 2
342342-# eval: (add-hook 'write-file-hooks 'time-stamp)
343343+# eval: (add-hook 'before-save-hook 'time-stamp)
343344# time-stamp-start: "scriptversion="
344345# time-stamp-format: "%:y-%02m-%02d.%02H"
345345-# time-stamp-time-zone: "UTC"
346346+# time-stamp-time-zone: "UTC0"
346347# time-stamp-end: "; # UTC"
347348# End:
-6
app/xinit/config.h.in
···66/* Define to 1 if you have the <inttypes.h> header file. */
77#undef HAVE_INTTYPES_H
8899-/* launchd support available */
1010-#undef HAVE_LAUNCHD
1111-1212-/* Define to 1 if you have the libdispatch (GCD) available */
1313-#undef HAVE_LIBDISPATCH
1414-159/* Define to 1 if you have the <memory.h> header file. */
1610#undef HAVE_MEMORY_H
1711
+15-142
app/xinit/configure
···11#! /bin/sh
22# Guess values for system-dependent variables and create Makefiles.
33-# Generated by GNU Autoconf 2.69 for xinit 1.4.1.
33+# Generated by GNU Autoconf 2.69 for xinit 1.4.2.
44#
55-# Report bugs to <https://gitlab.freedesktop.org/xorg/app/xinit/issues>.
55+# Report bugs to <https://gitlab.freedesktop.org/xorg/app/xinit/-/issues>.
66#
77#
88# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
···267267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268268 else
269269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
270270-$0: https://gitlab.freedesktop.org/xorg/app/xinit/issues
270270+$0: https://gitlab.freedesktop.org/xorg/app/xinit/-/issues
271271$0: about your system, including any error possibly output
272272$0: before this message. Then install a modern shell, or
273273$0: manually run the script under such a shell if you do
···581581# Identity of this package.
582582PACKAGE_NAME='xinit'
583583PACKAGE_TARNAME='xinit'
584584-PACKAGE_VERSION='1.4.1'
585585-PACKAGE_STRING='xinit 1.4.1'
586586-PACKAGE_BUGREPORT='https://gitlab.freedesktop.org/xorg/app/xinit/issues'
584584+PACKAGE_VERSION='1.4.2'
585585+PACKAGE_STRING='xinit 1.4.2'
586586+PACKAGE_BUGREPORT='https://gitlab.freedesktop.org/xorg/app/xinit/-/issues'
587587PACKAGE_URL=''
588588589589ac_unique_file="Makefile.am"
···649649XINIT_CFLAGS
650650LAUNCHAGENT_XSERVER_FALSE
651651LAUNCHAGENT_XSERVER_TRUE
652652-TIGER_LAUNCHD_FALSE
653653-TIGER_LAUNCHD_TRUE
654652LAUNCHD_FALSE
655653LAUNCHD_TRUE
656654launchagentxserver
···13711369 # Omit some internal or obsolete options to make the list less imposing.
13721370 # This message is too long to be a string in the A/UX 3.1 sh.
13731371 cat <<_ACEOF
13741374-\`configure' configures xinit 1.4.1 to adapt to many kinds of systems.
13721372+\`configure' configures xinit 1.4.2 to adapt to many kinds of systems.
1375137313761374Usage: $0 [OPTION]... [VAR=VALUE]...
13771375···1442144014431441if test -n "$ac_init_help"; then
14441442 case $ac_init_help in
14451445- short | recursive ) echo "Configuration of xinit 1.4.1:";;
14431443+ short | recursive ) echo "Configuration of xinit 1.4.2:";;
14461444 esac
14471445 cat <<\_ACEOF
14481446···15201518Use these variables to override the choices made by `configure' or to help
15211519it to find libraries and programs with nonstandard names/locations.
1522152015231523-Report bugs to <https://gitlab.freedesktop.org/xorg/app/xinit/issues>.
15211521+Report bugs to <https://gitlab.freedesktop.org/xorg/app/xinit/-/issues>.
15241522_ACEOF
15251523ac_status=$?
15261524fi
···15831581test -n "$ac_init_help" && exit $ac_status
15841582if $ac_init_version; then
15851583 cat <<\_ACEOF
15861586-xinit configure 1.4.1
15841584+xinit configure 1.4.2
15871585generated by GNU Autoconf 2.69
1588158615891587Copyright (C) 2012 Free Software Foundation, Inc.
···18361834 as_fn_set_status $ac_retval
1837183518381836} # ac_fn_c_try_link
18391839-18401840-# ac_fn_c_check_func LINENO FUNC VAR
18411841-# ----------------------------------
18421842-# Tests whether FUNC exists, setting the cache variable VAR accordingly
18431843-ac_fn_c_check_func ()
18441844-{
18451845- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
18461846- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
18471847-$as_echo_n "checking for $2... " >&6; }
18481848-if eval \${$3+:} false; then :
18491849- $as_echo_n "(cached) " >&6
18501850-else
18511851- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18521852-/* end confdefs.h. */
18531853-/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
18541854- For example, HP-UX 11i <limits.h> declares gettimeofday. */
18551855-#define $2 innocuous_$2
18561856-18571857-/* System header to define __stub macros and hopefully few prototypes,
18581858- which can conflict with char $2 (); below.
18591859- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18601860- <limits.h> exists even on freestanding compilers. */
18611861-18621862-#ifdef __STDC__
18631863-# include <limits.h>
18641864-#else
18651865-# include <assert.h>
18661866-#endif
18671867-18681868-#undef $2
18691869-18701870-/* Override any GCC internal prototype to avoid an error.
18711871- Use char because int might match the return type of a GCC
18721872- builtin and then its argument prototype would still apply. */
18731873-#ifdef __cplusplus
18741874-extern "C"
18751875-#endif
18761876-char $2 ();
18771877-/* The GNU C library defines this for functions which it implements
18781878- to always fail with ENOSYS. Some functions are actually named
18791879- something starting with __ and the normal name is an alias. */
18801880-#if defined __stub_$2 || defined __stub___$2
18811881-choke me
18821882-#endif
18831883-18841884-int
18851885-main ()
18861886-{
18871887-return $2 ();
18881888- ;
18891889- return 0;
18901890-}
18911891-_ACEOF
18921892-if ac_fn_c_try_link "$LINENO"; then :
18931893- eval "$3=yes"
18941894-else
18951895- eval "$3=no"
18961896-fi
18971897-rm -f core conftest.err conftest.$ac_objext \
18981898- conftest$ac_exeext conftest.$ac_ext
18991899-fi
19001900-eval ac_res=\$$3
19011901- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19021902-$as_echo "$ac_res" >&6; }
19031903- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
19041904-19051905-} # ac_fn_c_check_func
19061837cat >config.log <<_ACEOF
19071838This file contains any messages produced by compilers while
19081839running configure, to aid debugging if configure makes a mistake.
1909184019101910-It was created by xinit $as_me 1.4.1, which was
18411841+It was created by xinit $as_me 1.4.2, which was
19111842generated by GNU Autoconf 2.69. Invocation command line was
1912184319131844 $ $0 $@
···2736266727372668# Define the identity of the package.
27382669 PACKAGE='xinit'
27392739- VERSION='1.4.1'
26702670+ VERSION='1.4.2'
274026712741267227422673cat >>confdefs.h <<_ACEOF
···27802711278127122782271327832783-27842784-27852785-27862786-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
27872787-$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
27882788- # Check whether --enable-maintainer-mode was given.
27892789-if test "${enable_maintainer_mode+set}" = set; then :
27902790- enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
27912791-else
27922792- USE_MAINTAINER_MODE=no
27932793-fi
27942794-27952795- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
27962796-$as_echo "$USE_MAINTAINER_MODE" >&6; }
27972797- if test $USE_MAINTAINER_MODE = yes; then
27982798- MAINTAINER_MODE_TRUE=
27992799- MAINTAINER_MODE_FALSE='#'
28002800-else
28012801- MAINTAINER_MODE_TRUE='#'
28022802- MAINTAINER_MODE_FALSE=
28032803-fi
28042804-28052805- MAINT=$MAINTAINER_MODE_TRUE
280627142807271528082716···10886107941088710795fi
10888107961088910889-TIGER_LAUNCHD=no
1089010890-if test "x$LAUNCHD" = "xyes" ; then
1089110891-1089210892-$as_echo "#define HAVE_LAUNCHD 1" >>confdefs.h
1089310893-1089410894- case $host_os in
1089510895- darwin8*)
1089610896- TIGER_LAUNCHD=yes
1089710897- ;;
1089810898- esac
1089910899- ac_fn_c_check_func "$LINENO" "dispatch_async" "ac_cv_func_dispatch_async"
1090010900-if test "x$ac_cv_func_dispatch_async" = xyes; then :
1090110901-1090210902-$as_echo "#define HAVE_LIBDISPATCH 1" >>confdefs.h
1090310903-1090410904-fi
1090510905-1090610906-fi
1090710907-10908107971090910798cat >>confdefs.h <<_ACEOF
1091010799#define BUNDLE_ID_PREFIX "$bundleidprefix"
···1092210811 LAUNCHD_FALSE=
1092310812fi
10924108131092510925- if test "x$TIGER_LAUNCHD" = "xyes"; then
1092610926- TIGER_LAUNCHD_TRUE=
1092710927- TIGER_LAUNCHD_FALSE='#'
1092810928-else
1092910929- TIGER_LAUNCHD_TRUE='#'
1093010930- TIGER_LAUNCHD_FALSE=
1093110931-fi
1093210932-1093310814 if test "x$launchagentxserver" != "xno"; then
1093410815 LAUNCHAGENT_XSERVER_TRUE=
1093510816 LAUNCHAGENT_XSERVER_FALSE='#'
···1131611197 am__EXEEXT_FALSE=
1131711198fi
11318111991131911319-if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
1132011320- as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
1132111321-Usually this means the macro was only invoked conditionally." "$LINENO" 5
1132211322-fi
1132311200if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
1132411201 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
1132511202Usually this means the macro was only invoked conditionally." "$LINENO" 5
···1133611213 as_fn_error $? "conditional \"LAUNCHD\" was never defined.
1133711214Usually this means the macro was only invoked conditionally." "$LINENO" 5
1133811215fi
1133911339-if test -z "${TIGER_LAUNCHD_TRUE}" && test -z "${TIGER_LAUNCHD_FALSE}"; then
1134011340- as_fn_error $? "conditional \"TIGER_LAUNCHD\" was never defined.
1134111341-Usually this means the macro was only invoked conditionally." "$LINENO" 5
1134211342-fi
1134311216if test -z "${LAUNCHAGENT_XSERVER_TRUE}" && test -z "${LAUNCHAGENT_XSERVER_FALSE}"; then
1134411217 as_fn_error $? "conditional \"LAUNCHAGENT_XSERVER\" was never defined.
1134511218Usually this means the macro was only invoked conditionally." "$LINENO" 5
···1174111614# report actual input values of CONFIG_FILES etc. instead of their
1174211615# values after options handling.
1174311616ac_log="
1174411744-This file was extended by xinit $as_me 1.4.1, which was
1161711617+This file was extended by xinit $as_me 1.4.2, which was
1174511618generated by GNU Autoconf 2.69. Invocation command line was
11746116191174711620 CONFIG_FILES = $CONFIG_FILES
···1180111674Configuration commands:
1180211675$config_commands
11803116761180411804-Report bugs to <https://gitlab.freedesktop.org/xorg/app/xinit/issues>."
1167711677+Report bugs to <https://gitlab.freedesktop.org/xorg/app/xinit/-/issues>."
11805116781180611679_ACEOF
1180711680cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1180811681ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
1180911682ac_cs_version="\\
1181011810-xinit config.status 1.4.1
1168311683+xinit config.status 1.4.2
1181111684configured by $0, generated by GNU Autoconf 2.69,
1181211685 with options \\"\$ac_cs_config\\"
1181311686
+3-18
app/xinit/configure.ac
···22222323# Initialize Autoconf
2424AC_PREREQ([2.60])
2525-AC_INIT([xinit], [1.4.1],
2626- [https://gitlab.freedesktop.org/xorg/app/xinit/issues], [xinit])
2525+AC_INIT([xinit], [1.4.2],
2626+ [https://gitlab.freedesktop.org/xorg/app/xinit/-/issues], [xinit])
2727AC_CONFIG_SRCDIR([Makefile.am])
2828AC_CONFIG_HEADERS([config.h])
29293030# Initialize Automake
3131-AM_INIT_AUTOMAKE([foreign dist-bzip2])
3232-AM_MAINTAINER_MODE
3131+AM_INIT_AUTOMAKE([foreign dist-xz])
33323433# Require X.Org macros 1.19 or later for TRADITIONALCPPFLAGS
3534m4_ifndef([XORG_MACROS_VERSION],
···130129 AC_CHECK_PROG(LAUNCHD, [launchd], [yes], [no], [$PATH$PATH_SEPARATOR/sbin])
131130fi
132131133133-TIGER_LAUNCHD=no
134134-if test "x$LAUNCHD" = "xyes" ; then
135135- AC_DEFINE(HAVE_LAUNCHD, 1, [launchd support available])
136136- case $host_os in
137137- darwin8*)
138138- TIGER_LAUNCHD=yes
139139- ;;
140140- esac
141141- AC_CHECK_FUNC(dispatch_async,
142142- AC_DEFINE([HAVE_LIBDISPATCH], 1, [Define to 1 if you have the libdispatch (GCD) available]),
143143- [])
144144-fi
145145-146132AC_DEFINE_UNQUOTED(BUNDLE_ID_PREFIX, "$bundleidprefix", [Prefix to use for launchd identifiers])
147133AC_SUBST([launchagentsdir])
148134AC_SUBST([launchdaemonsdir])
149135AC_SUBST([bundleidprefix])
150136AC_SUBST([launchagentxserver])
151137AM_CONDITIONAL(LAUNCHD, [test "x$LAUNCHD" = "xyes"])
152152-AM_CONDITIONAL(TIGER_LAUNCHD, [test "x$TIGER_LAUNCHD" = "xyes"])
153138AM_CONDITIONAL(LAUNCHAGENT_XSERVER, [test "x$launchagentxserver" != "xno"])
154139155140# Checks for pkg-config packages
···11-/* Copyright (c) 2011 Apple Inc.
22- *
33- * Permission is hereby granted, free of charge, to any person
44- * obtaining a copy of this software and associated documentation files
55- * (the "Software"), to deal in the Software without restriction,
66- * including without limitation the rights to use, copy, modify, merge,
77- * publish, distribute, sublicense, and/or sell copies of the Software,
88- * and to permit persons to whom the Software is furnished to do so,
99- * subject to the following conditions:
1010- *
1111- * The above copyright notice and this permission notice shall be
1212- * included in all copies or substantial portions of the Software.
1313- *
1414- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
1515- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1616- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
1717- * NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT
1818- * HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
1919- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
2121- * DEALINGS IN THE SOFTWARE.
2222- *
2323- * Except as contained in this notice, the name(s) of the above
2424- * copyright holders shall not be used in advertising or otherwise to
2525- * promote the sale, use or other dealings in this Software without
2626- * prior written authorization.
2727- */
2828-2929-#ifdef HAVE_CONFIG_H
3030-#include <config.h>
3131-#else
3232-#define DEBUG_CONSOLE_REDIRECT 1
3333-#define HAVE_LIBDISPATCH 1
3434-#endif
3535-3636-#include <assert.h>
3737-#include <unistd.h>
3838-#include <stdio.h>
3939-#include <string.h>
4040-#include <stdlib.h>
4141-#include <sys/types.h>
4242-#include <sys/event.h>
4343-#include <asl.h>
4444-#include <errno.h>
4545-#include <fcntl.h>
4646-4747-#include "console_redirect.h"
4848-4949-#define BUF_SIZE 512
5050-5151-#ifdef HAVE_LIBDISPATCH
5252-#include <dispatch/dispatch.h>
5353-5454-static dispatch_queue_t redirect_serial_q;
5555-static dispatch_group_t read_source_group;
5656-#else
5757-#include <pthread.h>
5858-5959-static pthread_t redirect_pthread;
6060-static pthread_mutex_t redirect_fds_lock = PTHREAD_MUTEX_INITIALIZER;
6161-6262-static int kq;
6363-6464-/* Notifications to our reader thread */
6565-#define ASL_REDIRECT_TERMINATE ((void *)(uintptr_t)1)
6666-#endif
6767-6868-typedef struct {
6969- int level;
7070- aslclient asl;
7171- aslmsg msg;
7272-7373- /* Buffered reading */
7474- char *buf;
7575- char *w;
7676-7777-#ifdef HAVE_LIBDISPATCH
7878- dispatch_source_t read_source;
7979-#endif
8080-} asl_redirect;
8181-8282-static asl_redirect *redirect_fds = NULL;
8383-static int n_redirect_fds = 0;
8484-8585-/* Read from the FD until there is no more to read and redirect to ASL.
8686- * Preconditions:
8787- * 1: pthread_mutex_lock lock is held (pthreads) or called
8888- * from the appropriate serial queue for operating on
8989- * redirect_fds
9090- * 2: fd corresponds to a valid entry in redirect_fds
9191- *
9292- * Return values:
9393- * If the pipe is closed, EOF is returned regardless of how many bytes
9494- * were processed. If the pipe is still open, the number of read bytes
9595- * is returned.
9696- */
9797-static inline int _read_redirect(int fd, int flush) {
9898- int total_read = 0;
9999- int nbytes;
100100- asl_redirect *aslr = &redirect_fds[fd];
101101-102102- while((nbytes = read(fd, aslr->w, BUF_SIZE - (aslr->w - aslr->buf) - 1)) > 0) {
103103- char *s, *p;
104104-105105- /* Increment our returned number read */
106106- total_read += nbytes;
107107-108108- nbytes += (aslr->w - aslr->buf);
109109- aslr->buf[nbytes] = '\0';
110110-111111- /* One line at a time */
112112- for(p=aslr->buf; *p && (p - aslr->buf) < nbytes; p = s + 1) {
113113- // Find null or \n
114114- for(s=p; *s && *s != '\n'; s++);
115115- if(*s == '\n') {
116116- *s='\0';
117117- asl_log(aslr->asl, aslr->msg, aslr->level, "%s", p);
118118- } else if(aslr->buf != p) {
119119- memmove(aslr->buf, p, BUF_SIZE - (p - aslr->buf));
120120- aslr->w = aslr->buf + (s - p);
121121- break;
122122- } else if(nbytes == BUF_SIZE - 1) {
123123- asl_log(aslr->asl, aslr->msg, aslr->level, "%s", p);
124124- aslr->w = aslr->buf;
125125- break;
126126- }
127127- }
128128- }
129129-130130- /* Flush if requested or we're at EOF */
131131- if(flush || nbytes == 0) {
132132- if(aslr->w > aslr->buf) {
133133- *aslr->w = '\0';
134134- asl_log(aslr->asl, aslr->msg, aslr->level, "%s", aslr->buf);
135135- }
136136- }
137137-138138- if(nbytes == 0)
139139- return EOF;
140140- return total_read;
141141-}
142142-143143-#ifdef HAVE_LIBDISPATCH
144144-static void read_from_source(void *_source) {
145145- dispatch_source_t source = (dispatch_source_t)_source;
146146- int fd = dispatch_source_get_handle(source);
147147- if(_read_redirect(fd, 0) == EOF) {
148148- dispatch_source_cancel(source);
149149- }
150150-}
151151-152152-static void cancel_source(void *_source) {
153153- dispatch_source_t source = (dispatch_source_t)_source;
154154- int fd = dispatch_source_get_handle(source);
155155- asl_redirect *aslr = &redirect_fds[fd];
156156-157157- /* Flush the buffer */
158158- _read_redirect(fd, 1);
159159-160160- close(fd);
161161- free(aslr->buf);
162162- memset(aslr, 0, sizeof(*aslr));
163163- dispatch_release(source);
164164- dispatch_group_leave(read_source_group);
165165-}
166166-167167-#else /* !HAVE_LIBDISPATCH */
168168-static void *redirect_thread(void *ctx __unused) {
169169- struct kevent ev;
170170- int n;
171171-172172- while(1) {
173173- n = kevent(kq, NULL, 0, &ev, 1, NULL);
174174-175175- /* Bail on errors */
176176- if(n < 0) {
177177- asl_log(NULL, NULL, ASL_LEVEL_ERR, "kevent failure: %s", strerror(errno));
178178- break;
179179- }
180180-181181- /* This should not happen */
182182- if(n == 0)
183183- continue;
184184-185185- switch(ev.filter) {
186186- case EVFILT_READ:
187187- pthread_mutex_lock(&redirect_fds_lock);
188188- {
189189- int fd = ev.ident;
190190- int close_fd = 0;
191191- asl_redirect *aslr = &redirect_fds[fd];
192192-193193- if(fd < 0 || fd >= n_redirect_fds || aslr->buf == NULL) {
194194- asl_log(NULL, NULL, ASL_LEVEL_ERR, "Unexpected file descriptor: %d", fd);
195195- goto next;
196196- }
197197-198198- if(ev.flags & EV_EOF) {
199199- close_fd = 1;
200200- if(EOF != _read_redirect(fd, 1)) {
201201- asl_log(NULL, NULL, ASL_LEVEL_ERR, "kevent reported EOF on %d, but read doesn't concur.", fd);
202202- }
203203- } else {
204204- close_fd = (EOF == _read_redirect(fd, 0));
205205- }
206206-207207- if(close_fd) {
208208- EV_SET(&ev, fd, EVFILT_READ, EV_DELETE, 0, 0, 0);
209209- kevent(kq, &ev, 1, NULL, 0, NULL);
210210- close(fd);
211211- free(aslr->buf);
212212- memset(aslr, 0, sizeof(*aslr));
213213- }
214214- }
215215- next:
216216- pthread_mutex_unlock(&redirect_fds_lock);
217217-218218- case EVFILT_TIMER:
219219- if(ev.udata == ASL_REDIRECT_TERMINATE)
220220- return NULL;
221221-222222- default:
223223- ;;
224224- }
225225- }
226226-227227- return NULL;
228228-}
229229-#endif
230230-231231-static void redirect_atexit(void) {
232232- /* stdout is linebuffered, so flush the buffer */
233233- if(redirect_fds[STDOUT_FILENO].buf)
234234- fflush(stdout);
235235-236236-#ifdef HAVE_LIBDISPATCH
237237- {
238238- int i;
239239-240240- /* Cancel all of our dispatch sources, so they flush to ASL */
241241- for(i=0; i < n_redirect_fds; i++)
242242- if(redirect_fds[i].read_source)
243243- dispatch_source_cancel(redirect_fds[i].read_source);
244244-245245- /* Wait at least three seconds for our sources to flush to ASL */
246246- dispatch_group_wait(read_source_group, dispatch_time(DISPATCH_TIME_NOW, 3LL * NSEC_PER_SEC));
247247- }
248248-#else
249249- {
250250- struct kevent ev;
251251-252252- /* Tell our reader thread it is time to pack up and go home */
253253- EV_SET(&ev, 0, EVFILT_TIMER, EV_ADD | EV_ONESHOT, 0, 0, ASL_REDIRECT_TERMINATE);
254254- kevent(kq, &ev, 1, NULL, 0, NULL);
255255-256256- pthread_join(redirect_pthread, NULL);
257257- }
258258-#endif
259259-}
260260-261261-#ifdef HAVE_LIBDISPATCH
262262-static void xi_asl_init(void *ctx __unused)
263263-#else
264264-static void xi_asl_init(void)
265265-#endif
266266-{
267267- assert((redirect_fds = calloc(16, sizeof(*redirect_fds))) != NULL);
268268- n_redirect_fds = 16;
269269-270270-#ifdef HAVE_LIBDISPATCH
271271- redirect_serial_q = dispatch_queue_create("com.apple.asl-redirect", NULL);
272272- assert(redirect_serial_q != NULL);
273273-274274- read_source_group = dispatch_group_create();
275275- assert(read_source_group != NULL);
276276-#else
277277- assert((kq = kqueue()) != -1);
278278- assert(pthread_create(&redirect_pthread, NULL, redirect_thread, NULL) == 0);
279279-#endif
280280-281281- atexit(redirect_atexit);
282282-}
283283-284284-int xi_asl_log_fd(aslclient asl, aslmsg msg, int level, int fd) {
285285-#ifdef HAVE_LIBDISPATCH
286286- int err __block = 0;
287287- static dispatch_once_t once_control;
288288- dispatch_once_f(&once_control, NULL, xi_asl_init);
289289-#else
290290- int err = 0;
291291- static pthread_once_t once_control = PTHREAD_ONCE_INIT;
292292- assert(pthread_once(&once_control, xi_asl_init) == 0);
293293-#endif
294294-295295- if(fd < 0)
296296- return EBADF;
297297-298298-#ifdef HAVE_LIBDISPATCH
299299-#define BLOCK_DONE return
300300- dispatch_sync(redirect_serial_q, ^
301301-#else
302302-#define BLOCK_DONE goto done
303303- assert(pthread_mutex_lock(&redirect_fds_lock) == 0);
304304-#endif
305305- {
306306- /* Reallocate if we need more space */
307307- if(fd >= n_redirect_fds) {
308308- size_t new_n = 1 << (ffs(fd) + 1);
309309- asl_redirect *new_array = realloc(redirect_fds, new_n * sizeof(*redirect_fds));
310310- if(!new_array) {
311311- err = errno;
312312- BLOCK_DONE;
313313- }
314314- redirect_fds = new_array;
315315- memset(redirect_fds + n_redirect_fds, 0, new_n - n_redirect_fds);
316316- n_redirect_fds = new_n;
317317- }
318318-319319- /* If we're already listening on it, return error. */
320320- if(redirect_fds[fd].buf != NULL) {
321321- err = EBADF;
322322- BLOCK_DONE;
323323- }
324324-325325- /* Initialize our buffer */
326326- redirect_fds[fd].buf = (char *)malloc(BUF_SIZE);
327327- if(redirect_fds[fd].buf == NULL) {
328328- err = errno;
329329- BLOCK_DONE;
330330- }
331331- redirect_fds[fd].w = redirect_fds[fd].buf;
332332-333333- /* Store our ASL settings */
334334- redirect_fds[fd].level = level;
335335- redirect_fds[fd].asl = asl;
336336- redirect_fds[fd].msg = msg;
337337-338338- /* Don't block on reads from this fd */
339339- fcntl(fd, F_SETFL, O_NONBLOCK);
340340-341341- /* Start listening */
342342-#ifdef HAVE_LIBDISPATCH
343343- {
344344- dispatch_source_t read_source = dispatch_source_create(DISPATCH_SOURCE_TYPE_READ, fd, 0, redirect_serial_q);
345345- redirect_fds[fd].read_source = read_source;
346346- dispatch_set_context(read_source, read_source);
347347- dispatch_source_set_event_handler_f(read_source, read_from_source);
348348- dispatch_source_set_cancel_handler_f(read_source, cancel_source);
349349- dispatch_group_enter(read_source_group);
350350- dispatch_resume(read_source);
351351- }
352352-#else
353353- {
354354- struct kevent ev;
355355- EV_SET(&ev, fd, EVFILT_READ, EV_ADD, 0, 0, 0);
356356- kevent(kq, &ev, 1, NULL, 0, NULL);
357357- }
358358-#endif
359359- }
360360-#ifdef HAVE_LIBDISPATCH
361361- );
362362-#else
363363-done:
364364- assert(pthread_mutex_unlock(&redirect_fds_lock) == 0);
365365-#endif
366366-#undef BLOCK_DONE
367367-368368- return err;
369369-}
370370-371371-int xi_asl_capture_fd(aslclient asl, aslmsg msg, int level, int fd) {
372372- int pipepair[2];
373373-374374- /* Create pipe */
375375- if(pipe(pipepair) == -1)
376376- return errno;
377377-378378- /* Close the read fd but not the write fd on exec */
379379- if(fcntl(pipepair[0], F_SETFD, FD_CLOEXEC) == -1)
380380- return errno;
381381-382382- /* Replace the existing fd */
383383- if(dup2(pipepair[1], fd) == -1) {
384384- close(pipepair[0]);
385385- close(pipepair[1]);
386386- return errno;
387387- }
388388-389389- /* If we capture STDOUT_FILENO, make sure we linebuffer stdout */
390390- if(fd == STDOUT_FILENO)
391391- setlinebuf(stdout);
392392-393393- /* Close the duplicate fds since they've been reassigned */
394394- close(pipepair[1]);
395395-396396- /* Hand off the read end of our pipe to xi_asl_log_fd */
397397- return xi_asl_log_fd(asl, msg, level, pipepair[0]);
398398-}
399399-400400-#ifdef DEBUG_CONSOLE_REDIRECT
401401-int main(int argc __unused, char **argv __unused) {
402402- xi_asl_capture_fd(NULL, NULL, ASL_LEVEL_NOTICE, STDOUT_FILENO);
403403- xi_asl_capture_fd(NULL, NULL, ASL_LEVEL_ERR, STDERR_FILENO);
404404-405405- fprintf(stderr, "TEST ERR1\n");
406406- fprintf(stdout, "TEST OUT1\n");
407407- fprintf(stderr, "TEST ERR2\n");
408408- fprintf(stdout, "TEST OUT2\n");
409409- system("/bin/echo SYST OUT");
410410- system("/bin/echo SYST ERR >&2");
411411- fprintf(stdout, "TEST OUT3\n");
412412- fprintf(stdout, "TEST OUT4\n");
413413- fprintf(stderr, "TEST ERR3\n");
414414- fprintf(stderr, "TEST ERR4\n");
415415-416416- exit(0);
417417-}
418418-#endif
-44
app/xinit/launchd/console_redirect.h
···11-/* Copyright (c) 2011 Apple Inc.
22- *
33- * Permission is hereby granted, free of charge, to any person
44- * obtaining a copy of this software and associated documentation files
55- * (the "Software"), to deal in the Software without restriction,
66- * including without limitation the rights to use, copy, modify, merge,
77- * publish, distribute, sublicense, and/or sell copies of the Software,
88- * and to permit persons to whom the Software is furnished to do so,
99- * subject to the following conditions:
1010- *
1111- * The above copyright notice and this permission notice shall be
1212- * included in all copies or substantial portions of the Software.
1313- *
1414- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
1515- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1616- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
1717- * NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT
1818- * HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
1919- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
2121- * DEALINGS IN THE SOFTWARE.
2222- *
2323- * Except as contained in this notice, the name(s) of the above
2424- * copyright holders shall not be used in advertising or otherwise to
2525- * promote the sale, use or other dealings in this Software without
2626- * prior written authorization.
2727- */
2828-2929-#ifndef _XQUARTZ_CONSOLE_REDIRECT_H_
3030-#define _XQUARTZ_CONSOLE_REDIRECT_H_
3131-3232-#include <asl.h>
3333-3434-/* The given fd is replaced with a pipe. Anything written to it will will be
3535- * logged to ASL.
3636- */
3737-int xi_asl_capture_fd(aslclient asl, aslmsg msg, int level, int fd);
3838-3939-/* The given fd is read from and passed along to ASL until all write ends of the
4040- * pipe are closed. Once the last writer has closed the pipe, we close our end.
4141- */
4242-int xi_asl_log_fd(aslclient asl, aslmsg msg, int level, int fd);
4343-4444-#endif
···7171.PP
7272To determine the client to run,
7373.B startx
7474-looks for the following files, in order:
7575-.RS
7676-.PP
7777-.I $(HOME)/.startxrc
7878-.PP
7979-.I __libdir__/sys.startxrc
8080-.PP
8181-.I $(HOME)/.xinitrc
8282-.PP
8383-.I __xinitdir__/xinitrc
8484-.RE
8585-.PP
7474+first checks the environment variable
7575+.I XINITRC
7676+for a filename. If that variable is unset, or does not contain a filename,
7777+it looks for a file called
7878+.I .xinitrc
7979+in the user's home directory. If that is not found, it uses
8080+the file
8181+.I xinitrc
8282+in the
8383+.I xinit
8484+library directory.
8685If command line client options are given, they override this
8786behavior and revert to the
8887.BR xinit (__appmansuffix__)
8988behavior.
9089To determine the server to run,
9190.B startx
9292-first looks for a file called
9191+checks the environment variable
9292+.I XSERVERRC
9393+for a filename. If that variable is unset, or does not contain a filename,
9494+it looks for a file called
9395.I .xserverrc
9496in the user's home directory. If that is not found, it uses
9597the file
···165167and
166168.IR Xsecurity (__miscmansuffix__)
167169manual pages for more information on X client/server authentication.
170170+.TP 25
171171+XINITRC
172172+This variable should contain the location of an xinitrc file. If unset,
173173+.I $(HOME)/.xinitrc
174174+or
175175+.I __xinitdir__/xinitrc
176176+will be used.
177177+.TP 25
178178+XSERVERRC
179179+This variable should contain the location of an xserver file. If unset,
180180+.I $(HOME)/.xinitrc
181181+or
182182+.I __xinitdir__/xserverrc
183183+will be used.
168184.SH FILES
169185.TP 25
170186.I $(HOME)/.xinitrc
+1-1
app/xinit/man/xinit.man
···120120This will use the command \fI\./Xorg \-l \-c\fP to start the server and will
121121append the arguments \fI\-e widgets\fP to the default \fIxterm\fP command.
122122.TP 8
123123-.B "xinit /usr/ucb/rsh fasthost cpupig \-display ws:1 \-\^\- :1 \-a 2 \-t 5"
123123+.B "xinit /usr/bin/ssh \-X fasthost cpupig \-\^\- :1 \-a 2 \-t 5"
124124This will start a server named \fIX\fP on display 1 with the arguments
125125\fI\-a 2 \-t 5\fP. It will then start a remote shell on the machine
126126\fBfasthost\fP in which it will run the command \fIcpupig\fP, telling it
+17-26
app/xinit/startx.cpp
···2233XCOMM
44XCOMM This is just a sample implementation of a slightly less primitive
55-XCOMM interface than xinit. It looks for user .xinitrc and .xserverrc
66-XCOMM files, then system xinitrc and xserverrc files, else lets xinit choose
77-XCOMM its default. The system xinitrc should probably do things like check
88-XCOMM for .Xresources files and merge them in, start up a window manager,
99-XCOMM and pop a clock and several xterms.
55+XCOMM interface than xinit. It looks for XINITRC and XSERVERRC environment
66+XCOMM variables, then user .xinitrc and .xserverrc files, and then system
77+XCOMM xinitrc and xserverrc files, else lets xinit choose its default.
88+XCOMM The system xinitrc should probably do things like check for
99+XCOMM .Xresources files and merge them in, start up a window manager, and
1010+XCOMM pop a clock and several xterms.
1011XCOMM
1112XCOMM Site administrators are STRONGLY urged to write nicer versions.
1213XCOMM
13141414-unset DBUS_SESSION_BUS_ADDRESS
1515unset SESSION_MANAGER
16161717#ifdef __APPLE__
···4848#endif
49495050userclientrc=$HOME/.xinitrc
5151+[ -f "${XINITRC}" ] && userclientrc="${XINITRC}"
5152sysclientrc=XINITDIR/xinitrc
52535354userserverrc=$HOME/.xserverrc
5555+[ -f "${XSERVERRC}" ] && userclientrc="${XSERVERRC}"
5456sysserverrc=XINITDIR/xserverrc
5557defaultclient=XTERM
5658defaultserver=XSERVER
···8789XCOMM First, start caching fonts
8890if [ x`defaults read $X11_PREFS_DOMAIN cache_fonts` = x1 ] ; then
8991 if [ -x $bindir/font_cache ] ; then
9090- $bindir/font_cache &
9292+ $bindir/font_cache
9193 elif [ -x $bindir/font_cache.sh ] ; then
9292- $bindir/font_cache.sh &
9494+ $bindir/font_cache.sh
9395 elif [ -x $bindir/fc-cache ] ; then
9494- $bindir/fc-cache &
9696+ $bindir/fc-cache
9597 fi
9698fi
979998100if [ -x __libexecdir__/privileged_startx ] ; then
9999- # Don't push this into the background becasue it can cause
100100- # a race to create /tmp/.X11-unix
101101+ XCOMM Don't push this into the background because it can cause
102102+ XCOMM a race to create /tmp/.X11-unix
101103 __libexecdir__/privileged_startx
102104fi
103105···114116fi
115117116118if [ x`defaults read $X11_PREFS_DOMAIN enable_iglx` = x1 ] ; then
117117- defaultserverargs="$defaultserverargs +iglx"
119119+ defaultserverargs="$defaultserverargs +iglx +extension GLX"
118120else
119121 defaultserverargs="$defaultserverargs -iglx"
120122fi
···206208 XCOMM "https://bugzilla.redhat.com/show_bug.cgi?id=806491"
207209 tty=$(tty)
208210 if expr "$tty" : '/dev/tty[0-9][0-9]*$' > /dev/null; then
209209- tty_num=$(echo "$tty" | grep -oE '[0-9]+$')
211211+ tty_num=${tty#/dev/tty}
210212 vtarg="vt$tty_num -keeptty"
211213 fi
212214#endif
···251253 removelist=
252254253255 XCOMM set up default Xauth info for this machine
254254- case `uname` in
255255- Linux*)
256256- if [ -z "`hostname --version 2>&1 | grep GNU`" ]; then
257257- hostname=`hostname -f`
258258- else
259259- hostname=`hostname`
260260- fi
261261- ;;
262262- *)
263263- hostname=`hostname`
264264- ;;
265265- esac
256256+ hostname=`uname -n`
266257267258 authdisplay=${display:-:0}
268259#if defined(HAS_COOKIE_MAKER) && defined(MK_COOKIE)
···282273283274 XCOMM create a file with auth information for the server. ':0' is a dummy.
284275 xserverauthfile=`mktemp ${HOME}/.serverauth.XXXXXXXXXX`
285285- trap "rm -f '$xserverauthfile'" HUP INT QUIT ILL TRAP KILL BUS TERM
276276+ trap "rm -f '$xserverauthfile'" HUP INT QUIT ILL TRAP BUS TERM
286277 xauth -q -f "$xserverauthfile" << EOF
287278add :$dummy . $mcookie
288279EOF
+1-1
app/xinit/xinit.c
···263263 /*
264264 * Start the server and client.
265265 */
266266- signal(SIGCHLD, SIG_DFL); /* Insurance */
267266268267 /* Let those signal interrupt the wait() call in the main loop */
269268 memset(&sa, 0, sizeof sa);
···284283285284 sigaction(SIGALRM, &si, NULL);
286285 sigaction(SIGUSR1, &si, NULL);
286286+ sigaction(SIGCHLD, &si, NULL);
287287288288#ifdef __APPLE__
289289#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060