mirror of OpenBSD xenocara tree github.com/openbsd/xenocara
openbsd
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Update xinit to version 1.4.2

matthieu b56b3f58 4693da8e

+275 -770
+177 -3
app/xinit/ChangeLog
··· 1 + commit f9786fb5a7e526035699f3d4d6661468ab20e689 2 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 3 + Date: Sat Dec 3 14:05:44 2022 -0800 4 + 5 + xinit 1.4.2 6 + 7 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 8 + 9 + commit 4f22f255e58fda758fcdd85f8554c4ef274600e8 10 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 11 + Date: Wed Nov 9 12:22:19 2022 -0800 12 + 13 + man page: Update remote display example from rsh to ssh 14 + 15 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 16 + 17 + commit 4e66c0bf2b5751e113ad3aba79891608f7e883e2 18 + Author: Tim Egenton <tegenton@splattim.me> 19 + Date: Tue Dec 7 09:15:18 2021 -0500 20 + 21 + startx: Source XINITRC and XSERVERRC variables 22 + 23 + Fix issue #14 24 + 25 + Check XINITRC and XSERVERRC, if those files do not exist then just use 26 + ~/.xinitrc and ~/.xserverc as normal. 27 + 28 + Signed-off-by: Tim Egenton <tegenton@splattim.me> 29 + 30 + commit 0ea1ec1ed445235cdba9e54e71023d5a82feed6b 31 + Author: Arthur Williams <taaparthur@disroot.org> 32 + Date: Fri Oct 14 20:59:54 2022 -0700 33 + 34 + Don't wait for X to finish starting if it has died 35 + 36 + On my setup, when X first starts there aren't any screens available so 37 + it immediately dies. Half a second later, screens become available but 38 + xinit would still be waiting for the dead X process to signal that it 39 + is ready. It'll take 15s for it to timeout and respawn X. 40 + 41 + This patch makes xinit listen for its child's death and if X dies, it'll 42 + immediately stop waiting for it to finish starting and attempt to start 43 + it again. 44 + 45 + commit 60389ce90f552d9dfef8facf0efaf48efa59d93c 46 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 47 + Date: Thu Jul 28 17:30:21 2022 -0700 48 + 49 + gitlab CI: stop requiring Signed-off-by in commits 50 + 51 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 52 + 53 + commit d190145b94d00efe8a52c01c1675c308baa335cc 54 + Author: Dominik 'Rathann' Mierzejewski <dominik@greysector.net> 55 + Date: Thu Jun 9 11:21:17 2022 +0200 56 + 57 + stop unsetting DBUS_SESSION_BUS_ADDRESS variable 58 + 59 + It's not necessary as we no longer support running startx from an 60 + existing X session. 61 + 62 + Fixes #9. 63 + 64 + Signed-off-by: Dominik Mierzejewski <dominik@greysector.net> 65 + 66 + commit 6bdce31401e3caf10242f1e8a4855b2c8e90ea13 67 + Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com> 68 + Date: Sun Jun 19 20:09:55 2022 -0700 69 + 70 + darwin: Wait for font_cache to complete to avoid a race with `xset fb=` 71 + 72 + Partially fixes: https://github.com/XQuartz/XQuartz/issues/216 73 + Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> 74 + 75 + commit bf1d55c1aeef4d4755e1dbaf05cd625e48780bfb 76 + Author: nia <nia@NetBSD.org> 77 + Date: Thu Apr 7 22:33:28 2022 +0200 78 + 79 + startx: don't attempt to catch SIGKILL 80 + 81 + Most shells ignore attempts to catch SIGKILL. Some, such as NetBSD's 82 + /bin/sh, print an annoying message helpfully reminding you 83 + that it isn't possible to catch SIGKILL whenever X starts. 84 + 85 + Signed-off-by: Nia Alarie <nia@NetBSD.org> 86 + 87 + commit 71a8997cad602ef0adc9fed110e8a04d2a8fc8dc 88 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 89 + Date: Mon Dec 6 14:37:17 2021 -0800 90 + 91 + Build xz tarballs instead of bzip2 92 + 93 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 94 + 95 + commit 366a03498d51958757cf03aa1ebbdf06db4eb2de 96 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 97 + Date: Mon Dec 6 14:37:14 2021 -0800 98 + 99 + gitlab CI: add a basic build test 100 + 101 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 102 + 103 + commit bdf2af54a800470990a66d11b14589e19fa568ac 104 + Author: Arthur Williams <taaparthur@gmail.com> 105 + Date: Fri Jun 4 21:44:03 2021 -0700 106 + 107 + Remove non-portable grep usage from startx 108 + 109 + startx uses non-portable grep flags (-o). grep isn't even needed for 110 + this and has been replaced with substring removal. 111 + 112 + Closes #6 113 + 114 + commit ae77976adaae9948e3e8d7a673dc88df4e31de46 115 + Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com> 116 + Date: Mon Mar 15 17:37:53 2021 -0700 117 + 118 + darwin: Specify +extension GLX when the user requests IGLX support 119 + 120 + Fixes: https://github.com/XQuartz/XQuartz/issues/54 121 + Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> 122 + 123 + commit 8caf10c018d77a097015798b604be8817f526274 124 + Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com> 125 + Date: Wed Mar 10 13:50:09 2021 -0800 126 + 127 + darwin: Ensure we launch the user startx from $HOME 128 + 129 + Fixes: https://github.com/XQuartz/XQuartz/issues/114 130 + Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> 131 + 132 + commit db21df4054e3351d14eb7dc1c3216cd23a61cee4 133 + Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com> 134 + Date: Wed Mar 10 13:46:23 2021 -0800 135 + 136 + darwin: Drop support for macOS 10.7 and earlier 137 + 138 + Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> 139 + 140 + commit e2430bcb8327682340d985f89ad5137efa2f0d4f 141 + Author: Rickie Schroeder <1187-Gregg16@users.noreply.gitlab.freedesktop.org> 142 + Date: Fri Aug 28 13:34:05 2020 +0000 143 + 144 + startx: use uname -n instead of hostname 145 + 146 + 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. 147 + 148 + Using uname -n instead fixes this in a portable way. 149 + 150 + commit 91d2aba6364ec6685411595ccafea69fe9d20d6c 151 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 152 + Date: Thu Jul 23 09:26:21 2020 -0700 153 + 154 + Fix spelling/wording issues 155 + 156 + Found by using: 157 + codespell --builtin clear,rare,usage,informal,code,names 158 + 159 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 160 + 161 + commit 4f54d1843a780a71c3be0b56fe2ad2ddfcbaf928 162 + Author: Matt Turner <mattst88@gmail.com> 163 + Date: Sun Mar 8 15:16:36 2020 -0700 164 + 165 + man: Restore non-SCO UNIX bits of the man page 166 + 167 + It looks to me like commit 5268936259c5 (Remove SCO support for 168 + SHELL_CMD and startx man page.) removed the wrong bits of the man page. 169 + 170 + This commit replaces the SCO UNIX bits of the man page with the non-SCO 171 + UNIX bits. 172 + 173 + Signed-off-by: Matt Turner <mattst88@gmail.com> 174 + 1 175 commit 9a8b937bcfd84575e13039f316cbcb14c9729df4 2 176 Author: Alan Coopersmith <alan.coopersmith@oracle.com> 3 177 Date: Sun Mar 3 11:56:43 2019 -0800 ··· 1297 1471 when the structure of the component changes. Do not edit defaults. 1298 1472 1299 1473 commit d243b9943879ec2790d65785805aefdfbb64a378 1300 - Author: Rémi Cardona <remi@gentoo.org> 1474 + Author: Rémi Cardona <remi@gentoo.org> 1301 1475 Date: Sat Nov 14 14:51:59 2009 +0100 1302 1476 1303 1477 xinit 1.2.0 ··· 1343 1517 Tested-by: Jon TURNEY <jon.turney@dronecode.org.uk> 1344 1518 1345 1519 commit c2a5751175b11d3206805468aae1ddecd02c4a98 1346 - Author: Rémi Cardona <remi@gentoo.org> 1520 + Author: Rémi Cardona <remi@gentoo.org> 1347 1521 Date: Sat Oct 3 11:50:12 2009 +0200 1348 1522 1349 1523 make XINITDIR configurable at build-time, default is unchanged ··· 2327 2501 correctly 2328 2502 2329 2503 commit d731a249d0c1c7f9eb77828c0d6e79cfdaf75589 2330 - Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> 2504 + Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> 2331 2505 Date: Tue Jul 5 21:12:01 2005 +0000 2332 2506 2333 2507 Build system for xinit
+3 -3
app/xinit/Makefile.in
··· 220 220 dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ 221 221 done; \ 222 222 reldir="$$dir2" 223 - DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 223 + DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.xz 224 224 GZIP_ENV = --best 225 - DIST_TARGETS = dist-bzip2 dist-gzip 225 + DIST_TARGETS = dist-xz dist-gzip 226 226 distuninstallcheck_listfiles = find . -type f -print 227 227 am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ 228 228 | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' ··· 800 800 dist-gzip: distdir 801 801 tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz 802 802 $(am__post_remove_distdir) 803 + 803 804 dist-bzip2: distdir 804 805 tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 805 806 $(am__post_remove_distdir) ··· 807 808 dist-lzip: distdir 808 809 tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz 809 810 $(am__post_remove_distdir) 810 - 811 811 dist-xz: distdir 812 812 tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz 813 813 $(am__post_remove_distdir)
+1 -1
app/xinit/README.md
··· 10 10 11 11 https://lists.x.org/mailman/listinfo/xorg 12 12 13 - The master development code repository can be found at: 13 + The primary development code repository can be found at: 14 14 15 15 https://gitlab.freedesktop.org/xorg/app/xinit 16 16
+9 -8
app/xinit/compile
··· 1 1 #! /bin/sh 2 2 # Wrapper for compilers which do not understand '-c -o'. 3 3 4 - scriptversion=2012-10-14.11; # UTC 4 + scriptversion=2018-03-07.03; # UTC 5 5 6 - # Copyright (C) 1999-2014 Free Software Foundation, Inc. 6 + # Copyright (C) 1999-2021 Free Software Foundation, Inc. 7 7 # Written by Tom Tromey <tromey@cygnus.com>. 8 8 # 9 9 # This program is free software; you can redistribute it and/or modify ··· 17 17 # GNU General Public License for more details. 18 18 # 19 19 # You should have received a copy of the GNU General Public License 20 - # along with this program. If not, see <http://www.gnu.org/licenses/>. 20 + # along with this program. If not, see <https://www.gnu.org/licenses/>. 21 21 22 22 # As a special exception to the GNU General Public License, if you 23 23 # distribute this file as part of a program that contains a ··· 53 53 MINGW*) 54 54 file_conv=mingw 55 55 ;; 56 - CYGWIN*) 56 + CYGWIN* | MSYS*) 57 57 file_conv=cygwin 58 58 ;; 59 59 *) ··· 67 67 mingw/*) 68 68 file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` 69 69 ;; 70 - cygwin/*) 70 + cygwin/* | msys/*) 71 71 file=`cygpath -m "$file" || echo "$file"` 72 72 ;; 73 73 wine/*) ··· 255 255 echo "compile $scriptversion" 256 256 exit $? 257 257 ;; 258 - cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) 258 + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ 259 + icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) 259 260 func_cl_wrapper "$@" # Doesn't return... 260 261 ;; 261 262 esac ··· 339 340 # Local Variables: 340 341 # mode: shell-script 341 342 # sh-indentation: 2 342 - # eval: (add-hook 'write-file-hooks 'time-stamp) 343 + # eval: (add-hook 'before-save-hook 'time-stamp) 343 344 # time-stamp-start: "scriptversion=" 344 345 # time-stamp-format: "%:y-%02m-%02d.%02H" 345 - # time-stamp-time-zone: "UTC" 346 + # time-stamp-time-zone: "UTC0" 346 347 # time-stamp-end: "; # UTC" 347 348 # End:
-6
app/xinit/config.h.in
··· 6 6 /* Define to 1 if you have the <inttypes.h> header file. */ 7 7 #undef HAVE_INTTYPES_H 8 8 9 - /* launchd support available */ 10 - #undef HAVE_LAUNCHD 11 - 12 - /* Define to 1 if you have the libdispatch (GCD) available */ 13 - #undef HAVE_LIBDISPATCH 14 - 15 9 /* Define to 1 if you have the <memory.h> header file. */ 16 10 #undef HAVE_MEMORY_H 17 11
+15 -142
app/xinit/configure
··· 1 1 #! /bin/sh 2 2 # Guess values for system-dependent variables and create Makefiles. 3 - # Generated by GNU Autoconf 2.69 for xinit 1.4.1. 3 + # Generated by GNU Autoconf 2.69 for xinit 1.4.2. 4 4 # 5 - # Report bugs to <https://gitlab.freedesktop.org/xorg/app/xinit/issues>. 5 + # Report bugs to <https://gitlab.freedesktop.org/xorg/app/xinit/-/issues>. 6 6 # 7 7 # 8 8 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. ··· 267 267 $as_echo "$0: be upgraded to zsh 4.3.4 or later." 268 268 else 269 269 $as_echo "$0: Please tell bug-autoconf@gnu.org and 270 - $0: https://gitlab.freedesktop.org/xorg/app/xinit/issues 270 + $0: https://gitlab.freedesktop.org/xorg/app/xinit/-/issues 271 271 $0: about your system, including any error possibly output 272 272 $0: before this message. Then install a modern shell, or 273 273 $0: manually run the script under such a shell if you do ··· 581 581 # Identity of this package. 582 582 PACKAGE_NAME='xinit' 583 583 PACKAGE_TARNAME='xinit' 584 - PACKAGE_VERSION='1.4.1' 585 - PACKAGE_STRING='xinit 1.4.1' 586 - PACKAGE_BUGREPORT='https://gitlab.freedesktop.org/xorg/app/xinit/issues' 584 + PACKAGE_VERSION='1.4.2' 585 + PACKAGE_STRING='xinit 1.4.2' 586 + PACKAGE_BUGREPORT='https://gitlab.freedesktop.org/xorg/app/xinit/-/issues' 587 587 PACKAGE_URL='' 588 588 589 589 ac_unique_file="Makefile.am" ··· 649 649 XINIT_CFLAGS 650 650 LAUNCHAGENT_XSERVER_FALSE 651 651 LAUNCHAGENT_XSERVER_TRUE 652 - TIGER_LAUNCHD_FALSE 653 - TIGER_LAUNCHD_TRUE 654 652 LAUNCHD_FALSE 655 653 LAUNCHD_TRUE 656 654 launchagentxserver ··· 1371 1369 # Omit some internal or obsolete options to make the list less imposing. 1372 1370 # This message is too long to be a string in the A/UX 3.1 sh. 1373 1371 cat <<_ACEOF 1374 - \`configure' configures xinit 1.4.1 to adapt to many kinds of systems. 1372 + \`configure' configures xinit 1.4.2 to adapt to many kinds of systems. 1375 1373 1376 1374 Usage: $0 [OPTION]... [VAR=VALUE]... 1377 1375 ··· 1442 1440 1443 1441 if test -n "$ac_init_help"; then 1444 1442 case $ac_init_help in 1445 - short | recursive ) echo "Configuration of xinit 1.4.1:";; 1443 + short | recursive ) echo "Configuration of xinit 1.4.2:";; 1446 1444 esac 1447 1445 cat <<\_ACEOF 1448 1446 ··· 1520 1518 Use these variables to override the choices made by `configure' or to help 1521 1519 it to find libraries and programs with nonstandard names/locations. 1522 1520 1523 - Report bugs to <https://gitlab.freedesktop.org/xorg/app/xinit/issues>. 1521 + Report bugs to <https://gitlab.freedesktop.org/xorg/app/xinit/-/issues>. 1524 1522 _ACEOF 1525 1523 ac_status=$? 1526 1524 fi ··· 1583 1581 test -n "$ac_init_help" && exit $ac_status 1584 1582 if $ac_init_version; then 1585 1583 cat <<\_ACEOF 1586 - xinit configure 1.4.1 1584 + xinit configure 1.4.2 1587 1585 generated by GNU Autoconf 2.69 1588 1586 1589 1587 Copyright (C) 2012 Free Software Foundation, Inc. ··· 1836 1834 as_fn_set_status $ac_retval 1837 1835 1838 1836 } # ac_fn_c_try_link 1839 - 1840 - # ac_fn_c_check_func LINENO FUNC VAR 1841 - # ---------------------------------- 1842 - # Tests whether FUNC exists, setting the cache variable VAR accordingly 1843 - ac_fn_c_check_func () 1844 - { 1845 - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 1846 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 1847 - $as_echo_n "checking for $2... " >&6; } 1848 - if eval \${$3+:} false; then : 1849 - $as_echo_n "(cached) " >&6 1850 - else 1851 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext 1852 - /* end confdefs.h. */ 1853 - /* Define $2 to an innocuous variant, in case <limits.h> declares $2. 1854 - For example, HP-UX 11i <limits.h> declares gettimeofday. */ 1855 - #define $2 innocuous_$2 1856 - 1857 - /* System header to define __stub macros and hopefully few prototypes, 1858 - which can conflict with char $2 (); below. 1859 - Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 1860 - <limits.h> exists even on freestanding compilers. */ 1861 - 1862 - #ifdef __STDC__ 1863 - # include <limits.h> 1864 - #else 1865 - # include <assert.h> 1866 - #endif 1867 - 1868 - #undef $2 1869 - 1870 - /* Override any GCC internal prototype to avoid an error. 1871 - Use char because int might match the return type of a GCC 1872 - builtin and then its argument prototype would still apply. */ 1873 - #ifdef __cplusplus 1874 - extern "C" 1875 - #endif 1876 - char $2 (); 1877 - /* The GNU C library defines this for functions which it implements 1878 - to always fail with ENOSYS. Some functions are actually named 1879 - something starting with __ and the normal name is an alias. */ 1880 - #if defined __stub_$2 || defined __stub___$2 1881 - choke me 1882 - #endif 1883 - 1884 - int 1885 - main () 1886 - { 1887 - return $2 (); 1888 - ; 1889 - return 0; 1890 - } 1891 - _ACEOF 1892 - if ac_fn_c_try_link "$LINENO"; then : 1893 - eval "$3=yes" 1894 - else 1895 - eval "$3=no" 1896 - fi 1897 - rm -f core conftest.err conftest.$ac_objext \ 1898 - conftest$ac_exeext conftest.$ac_ext 1899 - fi 1900 - eval ac_res=\$$3 1901 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 1902 - $as_echo "$ac_res" >&6; } 1903 - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 1904 - 1905 - } # ac_fn_c_check_func 1906 1837 cat >config.log <<_ACEOF 1907 1838 This file contains any messages produced by compilers while 1908 1839 running configure, to aid debugging if configure makes a mistake. 1909 1840 1910 - It was created by xinit $as_me 1.4.1, which was 1841 + It was created by xinit $as_me 1.4.2, which was 1911 1842 generated by GNU Autoconf 2.69. Invocation command line was 1912 1843 1913 1844 $ $0 $@ ··· 2736 2667 2737 2668 # Define the identity of the package. 2738 2669 PACKAGE='xinit' 2739 - VERSION='1.4.1' 2670 + VERSION='1.4.2' 2740 2671 2741 2672 2742 2673 cat >>confdefs.h <<_ACEOF ··· 2780 2711 2781 2712 2782 2713 2783 - 2784 - 2785 - 2786 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 2787 - $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } 2788 - # Check whether --enable-maintainer-mode was given. 2789 - if test "${enable_maintainer_mode+set}" = set; then : 2790 - enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval 2791 - else 2792 - USE_MAINTAINER_MODE=no 2793 - fi 2794 - 2795 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 2796 - $as_echo "$USE_MAINTAINER_MODE" >&6; } 2797 - if test $USE_MAINTAINER_MODE = yes; then 2798 - MAINTAINER_MODE_TRUE= 2799 - MAINTAINER_MODE_FALSE='#' 2800 - else 2801 - MAINTAINER_MODE_TRUE='#' 2802 - MAINTAINER_MODE_FALSE= 2803 - fi 2804 - 2805 - MAINT=$MAINTAINER_MODE_TRUE 2806 2714 2807 2715 2808 2716 ··· 10886 10794 10887 10795 fi 10888 10796 10889 - TIGER_LAUNCHD=no 10890 - if test "x$LAUNCHD" = "xyes" ; then 10891 - 10892 - $as_echo "#define HAVE_LAUNCHD 1" >>confdefs.h 10893 - 10894 - case $host_os in 10895 - darwin8*) 10896 - TIGER_LAUNCHD=yes 10897 - ;; 10898 - esac 10899 - ac_fn_c_check_func "$LINENO" "dispatch_async" "ac_cv_func_dispatch_async" 10900 - if test "x$ac_cv_func_dispatch_async" = xyes; then : 10901 - 10902 - $as_echo "#define HAVE_LIBDISPATCH 1" >>confdefs.h 10903 - 10904 - fi 10905 - 10906 - fi 10907 - 10908 10797 10909 10798 cat >>confdefs.h <<_ACEOF 10910 10799 #define BUNDLE_ID_PREFIX "$bundleidprefix" ··· 10922 10811 LAUNCHD_FALSE= 10923 10812 fi 10924 10813 10925 - if test "x$TIGER_LAUNCHD" = "xyes"; then 10926 - TIGER_LAUNCHD_TRUE= 10927 - TIGER_LAUNCHD_FALSE='#' 10928 - else 10929 - TIGER_LAUNCHD_TRUE='#' 10930 - TIGER_LAUNCHD_FALSE= 10931 - fi 10932 - 10933 10814 if test "x$launchagentxserver" != "xno"; then 10934 10815 LAUNCHAGENT_XSERVER_TRUE= 10935 10816 LAUNCHAGENT_XSERVER_FALSE='#' ··· 11316 11197 am__EXEEXT_FALSE= 11317 11198 fi 11318 11199 11319 - if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then 11320 - as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. 11321 - Usually this means the macro was only invoked conditionally." "$LINENO" 5 11322 - fi 11323 11200 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then 11324 11201 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. 11325 11202 Usually this means the macro was only invoked conditionally." "$LINENO" 5 ··· 11336 11213 as_fn_error $? "conditional \"LAUNCHD\" was never defined. 11337 11214 Usually this means the macro was only invoked conditionally." "$LINENO" 5 11338 11215 fi 11339 - if test -z "${TIGER_LAUNCHD_TRUE}" && test -z "${TIGER_LAUNCHD_FALSE}"; then 11340 - as_fn_error $? "conditional \"TIGER_LAUNCHD\" was never defined. 11341 - Usually this means the macro was only invoked conditionally." "$LINENO" 5 11342 - fi 11343 11216 if test -z "${LAUNCHAGENT_XSERVER_TRUE}" && test -z "${LAUNCHAGENT_XSERVER_FALSE}"; then 11344 11217 as_fn_error $? "conditional \"LAUNCHAGENT_XSERVER\" was never defined. 11345 11218 Usually this means the macro was only invoked conditionally." "$LINENO" 5 ··· 11741 11614 # report actual input values of CONFIG_FILES etc. instead of their 11742 11615 # values after options handling. 11743 11616 ac_log=" 11744 - This file was extended by xinit $as_me 1.4.1, which was 11617 + This file was extended by xinit $as_me 1.4.2, which was 11745 11618 generated by GNU Autoconf 2.69. Invocation command line was 11746 11619 11747 11620 CONFIG_FILES = $CONFIG_FILES ··· 11801 11674 Configuration commands: 11802 11675 $config_commands 11803 11676 11804 - Report bugs to <https://gitlab.freedesktop.org/xorg/app/xinit/issues>." 11677 + Report bugs to <https://gitlab.freedesktop.org/xorg/app/xinit/-/issues>." 11805 11678 11806 11679 _ACEOF 11807 11680 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 11808 11681 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" 11809 11682 ac_cs_version="\\ 11810 - xinit config.status 1.4.1 11683 + xinit config.status 1.4.2 11811 11684 configured by $0, generated by GNU Autoconf 2.69, 11812 11685 with options \\"\$ac_cs_config\\" 11813 11686
+3 -18
app/xinit/configure.ac
··· 22 22 23 23 # Initialize Autoconf 24 24 AC_PREREQ([2.60]) 25 - AC_INIT([xinit], [1.4.1], 26 - [https://gitlab.freedesktop.org/xorg/app/xinit/issues], [xinit]) 25 + AC_INIT([xinit], [1.4.2], 26 + [https://gitlab.freedesktop.org/xorg/app/xinit/-/issues], [xinit]) 27 27 AC_CONFIG_SRCDIR([Makefile.am]) 28 28 AC_CONFIG_HEADERS([config.h]) 29 29 30 30 # Initialize Automake 31 - AM_INIT_AUTOMAKE([foreign dist-bzip2]) 32 - AM_MAINTAINER_MODE 31 + AM_INIT_AUTOMAKE([foreign dist-xz]) 33 32 34 33 # Require X.Org macros 1.19 or later for TRADITIONALCPPFLAGS 35 34 m4_ifndef([XORG_MACROS_VERSION], ··· 130 129 AC_CHECK_PROG(LAUNCHD, [launchd], [yes], [no], [$PATH$PATH_SEPARATOR/sbin]) 131 130 fi 132 131 133 - TIGER_LAUNCHD=no 134 - if test "x$LAUNCHD" = "xyes" ; then 135 - AC_DEFINE(HAVE_LAUNCHD, 1, [launchd support available]) 136 - case $host_os in 137 - darwin8*) 138 - TIGER_LAUNCHD=yes 139 - ;; 140 - esac 141 - AC_CHECK_FUNC(dispatch_async, 142 - AC_DEFINE([HAVE_LIBDISPATCH], 1, [Define to 1 if you have the libdispatch (GCD) available]), 143 - []) 144 - fi 145 - 146 132 AC_DEFINE_UNQUOTED(BUNDLE_ID_PREFIX, "$bundleidprefix", [Prefix to use for launchd identifiers]) 147 133 AC_SUBST([launchagentsdir]) 148 134 AC_SUBST([launchdaemonsdir]) 149 135 AC_SUBST([bundleidprefix]) 150 136 AC_SUBST([launchagentxserver]) 151 137 AM_CONDITIONAL(LAUNCHD, [test "x$LAUNCHD" = "xyes"]) 152 - AM_CONDITIONAL(TIGER_LAUNCHD, [test "x$TIGER_LAUNCHD" = "xyes"]) 153 138 AM_CONDITIONAL(LAUNCHAGENT_XSERVER, [test "x$launchagentxserver" != "xno"]) 154 139 155 140 # Checks for pkg-config packages
+1 -7
app/xinit/launchd/Makefile.am
··· 1 1 DIST_SUBDIRS = privileged_startx user_startx 2 - SUBDIRS = privileged_startx 3 - 4 - if !TIGER_LAUNCHD 5 - SUBDIRS += user_startx 6 - endif 7 - 8 - EXTRA_DIST = console_redirect.h 2 + SUBDIRS = privileged_startx user_startx
+1 -3
app/xinit/launchd/Makefile.in
··· 49 49 POST_UNINSTALL = : 50 50 build_triplet = @build@ 51 51 host_triplet = @host@ 52 - @TIGER_LAUNCHD_FALSE@am__append_1 = user_startx 53 52 subdir = launchd 54 53 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in 55 54 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ··· 268 267 top_builddir = @top_builddir@ 269 268 top_srcdir = @top_srcdir@ 270 269 DIST_SUBDIRS = privileged_startx user_startx 271 - SUBDIRS = privileged_startx $(am__append_1) 272 - EXTRA_DIST = console_redirect.h 270 + SUBDIRS = privileged_startx user_startx 273 271 all: all-recursive 274 272 275 273 .SUFFIXES:
-418
app/xinit/launchd/console_redirect.c
··· 1 - /* Copyright (c) 2011 Apple Inc. 2 - * 3 - * Permission is hereby granted, free of charge, to any person 4 - * obtaining a copy of this software and associated documentation files 5 - * (the "Software"), to deal in the Software without restriction, 6 - * including without limitation the rights to use, copy, modify, merge, 7 - * publish, distribute, sublicense, and/or sell copies of the Software, 8 - * and to permit persons to whom the Software is furnished to do so, 9 - * subject to the following conditions: 10 - * 11 - * The above copyright notice and this permission notice shall be 12 - * included in all copies or substantial portions of the Software. 13 - * 14 - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 - * NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT 18 - * HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 19 - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 21 - * DEALINGS IN THE SOFTWARE. 22 - * 23 - * Except as contained in this notice, the name(s) of the above 24 - * copyright holders shall not be used in advertising or otherwise to 25 - * promote the sale, use or other dealings in this Software without 26 - * prior written authorization. 27 - */ 28 - 29 - #ifdef HAVE_CONFIG_H 30 - #include <config.h> 31 - #else 32 - #define DEBUG_CONSOLE_REDIRECT 1 33 - #define HAVE_LIBDISPATCH 1 34 - #endif 35 - 36 - #include <assert.h> 37 - #include <unistd.h> 38 - #include <stdio.h> 39 - #include <string.h> 40 - #include <stdlib.h> 41 - #include <sys/types.h> 42 - #include <sys/event.h> 43 - #include <asl.h> 44 - #include <errno.h> 45 - #include <fcntl.h> 46 - 47 - #include "console_redirect.h" 48 - 49 - #define BUF_SIZE 512 50 - 51 - #ifdef HAVE_LIBDISPATCH 52 - #include <dispatch/dispatch.h> 53 - 54 - static dispatch_queue_t redirect_serial_q; 55 - static dispatch_group_t read_source_group; 56 - #else 57 - #include <pthread.h> 58 - 59 - static pthread_t redirect_pthread; 60 - static pthread_mutex_t redirect_fds_lock = PTHREAD_MUTEX_INITIALIZER; 61 - 62 - static int kq; 63 - 64 - /* Notifications to our reader thread */ 65 - #define ASL_REDIRECT_TERMINATE ((void *)(uintptr_t)1) 66 - #endif 67 - 68 - typedef struct { 69 - int level; 70 - aslclient asl; 71 - aslmsg msg; 72 - 73 - /* Buffered reading */ 74 - char *buf; 75 - char *w; 76 - 77 - #ifdef HAVE_LIBDISPATCH 78 - dispatch_source_t read_source; 79 - #endif 80 - } asl_redirect; 81 - 82 - static asl_redirect *redirect_fds = NULL; 83 - static int n_redirect_fds = 0; 84 - 85 - /* Read from the FD until there is no more to read and redirect to ASL. 86 - * Preconditions: 87 - * 1: pthread_mutex_lock lock is held (pthreads) or called 88 - * from the appropriate serial queue for operating on 89 - * redirect_fds 90 - * 2: fd corresponds to a valid entry in redirect_fds 91 - * 92 - * Return values: 93 - * If the pipe is closed, EOF is returned regardless of how many bytes 94 - * were processed. If the pipe is still open, the number of read bytes 95 - * is returned. 96 - */ 97 - static inline int _read_redirect(int fd, int flush) { 98 - int total_read = 0; 99 - int nbytes; 100 - asl_redirect *aslr = &redirect_fds[fd]; 101 - 102 - while((nbytes = read(fd, aslr->w, BUF_SIZE - (aslr->w - aslr->buf) - 1)) > 0) { 103 - char *s, *p; 104 - 105 - /* Increment our returned number read */ 106 - total_read += nbytes; 107 - 108 - nbytes += (aslr->w - aslr->buf); 109 - aslr->buf[nbytes] = '\0'; 110 - 111 - /* One line at a time */ 112 - for(p=aslr->buf; *p && (p - aslr->buf) < nbytes; p = s + 1) { 113 - // Find null or \n 114 - for(s=p; *s && *s != '\n'; s++); 115 - if(*s == '\n') { 116 - *s='\0'; 117 - asl_log(aslr->asl, aslr->msg, aslr->level, "%s", p); 118 - } else if(aslr->buf != p) { 119 - memmove(aslr->buf, p, BUF_SIZE - (p - aslr->buf)); 120 - aslr->w = aslr->buf + (s - p); 121 - break; 122 - } else if(nbytes == BUF_SIZE - 1) { 123 - asl_log(aslr->asl, aslr->msg, aslr->level, "%s", p); 124 - aslr->w = aslr->buf; 125 - break; 126 - } 127 - } 128 - } 129 - 130 - /* Flush if requested or we're at EOF */ 131 - if(flush || nbytes == 0) { 132 - if(aslr->w > aslr->buf) { 133 - *aslr->w = '\0'; 134 - asl_log(aslr->asl, aslr->msg, aslr->level, "%s", aslr->buf); 135 - } 136 - } 137 - 138 - if(nbytes == 0) 139 - return EOF; 140 - return total_read; 141 - } 142 - 143 - #ifdef HAVE_LIBDISPATCH 144 - static void read_from_source(void *_source) { 145 - dispatch_source_t source = (dispatch_source_t)_source; 146 - int fd = dispatch_source_get_handle(source); 147 - if(_read_redirect(fd, 0) == EOF) { 148 - dispatch_source_cancel(source); 149 - } 150 - } 151 - 152 - static void cancel_source(void *_source) { 153 - dispatch_source_t source = (dispatch_source_t)_source; 154 - int fd = dispatch_source_get_handle(source); 155 - asl_redirect *aslr = &redirect_fds[fd]; 156 - 157 - /* Flush the buffer */ 158 - _read_redirect(fd, 1); 159 - 160 - close(fd); 161 - free(aslr->buf); 162 - memset(aslr, 0, sizeof(*aslr)); 163 - dispatch_release(source); 164 - dispatch_group_leave(read_source_group); 165 - } 166 - 167 - #else /* !HAVE_LIBDISPATCH */ 168 - static void *redirect_thread(void *ctx __unused) { 169 - struct kevent ev; 170 - int n; 171 - 172 - while(1) { 173 - n = kevent(kq, NULL, 0, &ev, 1, NULL); 174 - 175 - /* Bail on errors */ 176 - if(n < 0) { 177 - asl_log(NULL, NULL, ASL_LEVEL_ERR, "kevent failure: %s", strerror(errno)); 178 - break; 179 - } 180 - 181 - /* This should not happen */ 182 - if(n == 0) 183 - continue; 184 - 185 - switch(ev.filter) { 186 - case EVFILT_READ: 187 - pthread_mutex_lock(&redirect_fds_lock); 188 - { 189 - int fd = ev.ident; 190 - int close_fd = 0; 191 - asl_redirect *aslr = &redirect_fds[fd]; 192 - 193 - if(fd < 0 || fd >= n_redirect_fds || aslr->buf == NULL) { 194 - asl_log(NULL, NULL, ASL_LEVEL_ERR, "Unexpected file descriptor: %d", fd); 195 - goto next; 196 - } 197 - 198 - if(ev.flags & EV_EOF) { 199 - close_fd = 1; 200 - if(EOF != _read_redirect(fd, 1)) { 201 - asl_log(NULL, NULL, ASL_LEVEL_ERR, "kevent reported EOF on %d, but read doesn't concur.", fd); 202 - } 203 - } else { 204 - close_fd = (EOF == _read_redirect(fd, 0)); 205 - } 206 - 207 - if(close_fd) { 208 - EV_SET(&ev, fd, EVFILT_READ, EV_DELETE, 0, 0, 0); 209 - kevent(kq, &ev, 1, NULL, 0, NULL); 210 - close(fd); 211 - free(aslr->buf); 212 - memset(aslr, 0, sizeof(*aslr)); 213 - } 214 - } 215 - next: 216 - pthread_mutex_unlock(&redirect_fds_lock); 217 - 218 - case EVFILT_TIMER: 219 - if(ev.udata == ASL_REDIRECT_TERMINATE) 220 - return NULL; 221 - 222 - default: 223 - ;; 224 - } 225 - } 226 - 227 - return NULL; 228 - } 229 - #endif 230 - 231 - static void redirect_atexit(void) { 232 - /* stdout is linebuffered, so flush the buffer */ 233 - if(redirect_fds[STDOUT_FILENO].buf) 234 - fflush(stdout); 235 - 236 - #ifdef HAVE_LIBDISPATCH 237 - { 238 - int i; 239 - 240 - /* Cancel all of our dispatch sources, so they flush to ASL */ 241 - for(i=0; i < n_redirect_fds; i++) 242 - if(redirect_fds[i].read_source) 243 - dispatch_source_cancel(redirect_fds[i].read_source); 244 - 245 - /* Wait at least three seconds for our sources to flush to ASL */ 246 - dispatch_group_wait(read_source_group, dispatch_time(DISPATCH_TIME_NOW, 3LL * NSEC_PER_SEC)); 247 - } 248 - #else 249 - { 250 - struct kevent ev; 251 - 252 - /* Tell our reader thread it is time to pack up and go home */ 253 - EV_SET(&ev, 0, EVFILT_TIMER, EV_ADD | EV_ONESHOT, 0, 0, ASL_REDIRECT_TERMINATE); 254 - kevent(kq, &ev, 1, NULL, 0, NULL); 255 - 256 - pthread_join(redirect_pthread, NULL); 257 - } 258 - #endif 259 - } 260 - 261 - #ifdef HAVE_LIBDISPATCH 262 - static void xi_asl_init(void *ctx __unused) 263 - #else 264 - static void xi_asl_init(void) 265 - #endif 266 - { 267 - assert((redirect_fds = calloc(16, sizeof(*redirect_fds))) != NULL); 268 - n_redirect_fds = 16; 269 - 270 - #ifdef HAVE_LIBDISPATCH 271 - redirect_serial_q = dispatch_queue_create("com.apple.asl-redirect", NULL); 272 - assert(redirect_serial_q != NULL); 273 - 274 - read_source_group = dispatch_group_create(); 275 - assert(read_source_group != NULL); 276 - #else 277 - assert((kq = kqueue()) != -1); 278 - assert(pthread_create(&redirect_pthread, NULL, redirect_thread, NULL) == 0); 279 - #endif 280 - 281 - atexit(redirect_atexit); 282 - } 283 - 284 - int xi_asl_log_fd(aslclient asl, aslmsg msg, int level, int fd) { 285 - #ifdef HAVE_LIBDISPATCH 286 - int err __block = 0; 287 - static dispatch_once_t once_control; 288 - dispatch_once_f(&once_control, NULL, xi_asl_init); 289 - #else 290 - int err = 0; 291 - static pthread_once_t once_control = PTHREAD_ONCE_INIT; 292 - assert(pthread_once(&once_control, xi_asl_init) == 0); 293 - #endif 294 - 295 - if(fd < 0) 296 - return EBADF; 297 - 298 - #ifdef HAVE_LIBDISPATCH 299 - #define BLOCK_DONE return 300 - dispatch_sync(redirect_serial_q, ^ 301 - #else 302 - #define BLOCK_DONE goto done 303 - assert(pthread_mutex_lock(&redirect_fds_lock) == 0); 304 - #endif 305 - { 306 - /* Reallocate if we need more space */ 307 - if(fd >= n_redirect_fds) { 308 - size_t new_n = 1 << (ffs(fd) + 1); 309 - asl_redirect *new_array = realloc(redirect_fds, new_n * sizeof(*redirect_fds)); 310 - if(!new_array) { 311 - err = errno; 312 - BLOCK_DONE; 313 - } 314 - redirect_fds = new_array; 315 - memset(redirect_fds + n_redirect_fds, 0, new_n - n_redirect_fds); 316 - n_redirect_fds = new_n; 317 - } 318 - 319 - /* If we're already listening on it, return error. */ 320 - if(redirect_fds[fd].buf != NULL) { 321 - err = EBADF; 322 - BLOCK_DONE; 323 - } 324 - 325 - /* Initialize our buffer */ 326 - redirect_fds[fd].buf = (char *)malloc(BUF_SIZE); 327 - if(redirect_fds[fd].buf == NULL) { 328 - err = errno; 329 - BLOCK_DONE; 330 - } 331 - redirect_fds[fd].w = redirect_fds[fd].buf; 332 - 333 - /* Store our ASL settings */ 334 - redirect_fds[fd].level = level; 335 - redirect_fds[fd].asl = asl; 336 - redirect_fds[fd].msg = msg; 337 - 338 - /* Don't block on reads from this fd */ 339 - fcntl(fd, F_SETFL, O_NONBLOCK); 340 - 341 - /* Start listening */ 342 - #ifdef HAVE_LIBDISPATCH 343 - { 344 - dispatch_source_t read_source = dispatch_source_create(DISPATCH_SOURCE_TYPE_READ, fd, 0, redirect_serial_q); 345 - redirect_fds[fd].read_source = read_source; 346 - dispatch_set_context(read_source, read_source); 347 - dispatch_source_set_event_handler_f(read_source, read_from_source); 348 - dispatch_source_set_cancel_handler_f(read_source, cancel_source); 349 - dispatch_group_enter(read_source_group); 350 - dispatch_resume(read_source); 351 - } 352 - #else 353 - { 354 - struct kevent ev; 355 - EV_SET(&ev, fd, EVFILT_READ, EV_ADD, 0, 0, 0); 356 - kevent(kq, &ev, 1, NULL, 0, NULL); 357 - } 358 - #endif 359 - } 360 - #ifdef HAVE_LIBDISPATCH 361 - ); 362 - #else 363 - done: 364 - assert(pthread_mutex_unlock(&redirect_fds_lock) == 0); 365 - #endif 366 - #undef BLOCK_DONE 367 - 368 - return err; 369 - } 370 - 371 - int xi_asl_capture_fd(aslclient asl, aslmsg msg, int level, int fd) { 372 - int pipepair[2]; 373 - 374 - /* Create pipe */ 375 - if(pipe(pipepair) == -1) 376 - return errno; 377 - 378 - /* Close the read fd but not the write fd on exec */ 379 - if(fcntl(pipepair[0], F_SETFD, FD_CLOEXEC) == -1) 380 - return errno; 381 - 382 - /* Replace the existing fd */ 383 - if(dup2(pipepair[1], fd) == -1) { 384 - close(pipepair[0]); 385 - close(pipepair[1]); 386 - return errno; 387 - } 388 - 389 - /* If we capture STDOUT_FILENO, make sure we linebuffer stdout */ 390 - if(fd == STDOUT_FILENO) 391 - setlinebuf(stdout); 392 - 393 - /* Close the duplicate fds since they've been reassigned */ 394 - close(pipepair[1]); 395 - 396 - /* Hand off the read end of our pipe to xi_asl_log_fd */ 397 - return xi_asl_log_fd(asl, msg, level, pipepair[0]); 398 - } 399 - 400 - #ifdef DEBUG_CONSOLE_REDIRECT 401 - int main(int argc __unused, char **argv __unused) { 402 - xi_asl_capture_fd(NULL, NULL, ASL_LEVEL_NOTICE, STDOUT_FILENO); 403 - xi_asl_capture_fd(NULL, NULL, ASL_LEVEL_ERR, STDERR_FILENO); 404 - 405 - fprintf(stderr, "TEST ERR1\n"); 406 - fprintf(stdout, "TEST OUT1\n"); 407 - fprintf(stderr, "TEST ERR2\n"); 408 - fprintf(stdout, "TEST OUT2\n"); 409 - system("/bin/echo SYST OUT"); 410 - system("/bin/echo SYST ERR >&2"); 411 - fprintf(stdout, "TEST OUT3\n"); 412 - fprintf(stdout, "TEST OUT4\n"); 413 - fprintf(stderr, "TEST ERR3\n"); 414 - fprintf(stderr, "TEST ERR4\n"); 415 - 416 - exit(0); 417 - } 418 - #endif
-44
app/xinit/launchd/console_redirect.h
··· 1 - /* Copyright (c) 2011 Apple Inc. 2 - * 3 - * Permission is hereby granted, free of charge, to any person 4 - * obtaining a copy of this software and associated documentation files 5 - * (the "Software"), to deal in the Software without restriction, 6 - * including without limitation the rights to use, copy, modify, merge, 7 - * publish, distribute, sublicense, and/or sell copies of the Software, 8 - * and to permit persons to whom the Software is furnished to do so, 9 - * subject to the following conditions: 10 - * 11 - * The above copyright notice and this permission notice shall be 12 - * included in all copies or substantial portions of the Software. 13 - * 14 - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 - * NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT 18 - * HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 19 - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 21 - * DEALINGS IN THE SOFTWARE. 22 - * 23 - * Except as contained in this notice, the name(s) of the above 24 - * copyright holders shall not be used in advertising or otherwise to 25 - * promote the sale, use or other dealings in this Software without 26 - * prior written authorization. 27 - */ 28 - 29 - #ifndef _XQUARTZ_CONSOLE_REDIRECT_H_ 30 - #define _XQUARTZ_CONSOLE_REDIRECT_H_ 31 - 32 - #include <asl.h> 33 - 34 - /* The given fd is replaced with a pipe. Anything written to it will will be 35 - * logged to ASL. 36 - */ 37 - int xi_asl_capture_fd(aslclient asl, aslmsg msg, int level, int fd); 38 - 39 - /* The given fd is read from and passed along to ASL until all write ends of the 40 - * pipe are closed. Once the last writer has closed the pipe, we close our end. 41 - */ 42 - int xi_asl_log_fd(aslclient asl, aslmsg msg, int level, int fd); 43 - 44 - #endif
+3 -3
app/xinit/launchd/privileged_startx/20-font_cache.cpp
··· 27 27 XCOMM prior written authorization. 28 28 29 29 if [ -x BINDIR/font_cache ] ; then 30 - BINDIR/font_cache -s & 30 + BINDIR/font_cache -s 31 31 elif [ -x BINDIR/font_cache.sh ] ; then 32 - BINDIR/font_cache.sh -s & 32 + BINDIR/font_cache.sh -s 33 33 elif [ -x BINDIR/fc-cache ] ; then 34 - BINDIR/fc-cache & 34 + BINDIR/fc-cache 35 35 fi
-5
app/xinit/launchd/privileged_startx/Makefile.am
··· 36 36 AM_CPPFLAGS = -I$(srcdir)/.. -DXINITDIR=\"$(xinitrcdir)\" -DSCRIPTDIR=\"$(privstartxdir)\" -DBINDIR=\"$(bindir)\" 37 37 CPP_FILES_FLAGS = -D__libexecdir__="$(libexecdir)" -DXINITDIR="$(xinitrcdir)" -DSCRIPTDIR="$(privstartxdir)" -DBINDIR="$(bindir)" -DBUNDLE_ID_PREFIX="$(bundleidprefix)" 38 38 39 - if TIGER_LAUNCHD 40 - CPP_FILES_FLAGS += -DTIGER_LAUNCHD 41 - endif 42 - 43 39 dist_privileged_startx_SOURCES = \ 44 - $(srcdir)/../console_redirect.c \ 45 40 server.c \ 46 41 client.c \ 47 42 privileged_startx.c
+3 -27
app/xinit/launchd/privileged_startx/Makefile.in
··· 89 89 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ 90 90 $(top_srcdir)/cpprules.in $(top_srcdir)/depcomp 91 91 libexec_PROGRAMS = privileged_startx$(EXEEXT) 92 - @TIGER_LAUNCHD_TRUE@am__append_1 = -DTIGER_LAUNCHD 93 92 subdir = launchd/privileged_startx 94 93 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 95 94 am__aclocal_m4_deps = $(top_srcdir)/configure.ac ··· 102 101 am__installdirs = "$(DESTDIR)$(libexecdir)" \ 103 102 "$(DESTDIR)$(privstartxdir)" "$(DESTDIR)$(launchdaemonsdir)" 104 103 PROGRAMS = $(libexec_PROGRAMS) 105 - dist_privileged_startx_OBJECTS = console_redirect.$(OBJEXT) \ 106 - server.$(OBJEXT) client.$(OBJEXT) privileged_startx.$(OBJEXT) 104 + dist_privileged_startx_OBJECTS = server.$(OBJEXT) client.$(OBJEXT) \ 105 + privileged_startx.$(OBJEXT) 107 106 nodist_privileged_startx_OBJECTS = privileged_startxServer.$(OBJEXT) \ 108 107 privileged_startxUser.$(OBJEXT) 109 108 privileged_startx_OBJECTS = $(dist_privileged_startx_OBJECTS) \ ··· 153 152 depcomp = $(SHELL) $(top_srcdir)/depcomp 154 153 am__depfiles_maybe = depfiles 155 154 am__mv = mv -f 156 - AM_V_lt = $(am__v_lt_@AM_V@) 157 - am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) 158 - am__v_lt_0 = --silent 159 - am__v_lt_1 = 160 155 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ 161 156 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) 162 157 AM_V_CC = $(am__v_CC_@AM_V@) ··· 341 336 privstartxdir = $(xinitrcdir)/privileged_startx.d 342 337 privstartx_SCRIPTS = 10-tmpdirs 20-font_cache 343 338 AM_CPPFLAGS = -I$(srcdir)/.. -DXINITDIR=\"$(xinitrcdir)\" -DSCRIPTDIR=\"$(privstartxdir)\" -DBINDIR=\"$(bindir)\" 344 - CPP_FILES_FLAGS = -D__libexecdir__="$(libexecdir)" \ 345 - -DXINITDIR="$(xinitrcdir)" -DSCRIPTDIR="$(privstartxdir)" \ 346 - -DBINDIR="$(bindir)" -DBUNDLE_ID_PREFIX="$(bundleidprefix)" \ 347 - $(am__append_1) 339 + CPP_FILES_FLAGS = -D__libexecdir__="$(libexecdir)" -DXINITDIR="$(xinitrcdir)" -DSCRIPTDIR="$(privstartxdir)" -DBINDIR="$(bindir)" -DBUNDLE_ID_PREFIX="$(bundleidprefix)" 348 340 dist_privileged_startx_SOURCES = \ 349 - $(srcdir)/../console_redirect.c \ 350 341 server.c \ 351 342 client.c \ 352 343 privileged_startx.c ··· 498 489 -rm -f *.tab.c 499 490 500 491 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/client.Po@am__quote@ 501 - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/console_redirect.Po@am__quote@ 502 492 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/privileged_startx.Po@am__quote@ 503 493 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/privileged_startxServer.Po@am__quote@ 504 494 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/privileged_startxUser.Po@am__quote@ ··· 517 507 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ 518 508 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 519 509 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` 520 - 521 - console_redirect.o: $(srcdir)/../console_redirect.c 522 - @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT console_redirect.o -MD -MP -MF $(DEPDIR)/console_redirect.Tpo -c -o console_redirect.o `test -f '$(srcdir)/../console_redirect.c' || echo '$(srcdir)/'`$(srcdir)/../console_redirect.c 523 - @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/console_redirect.Tpo $(DEPDIR)/console_redirect.Po 524 - @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../console_redirect.c' object='console_redirect.o' libtool=no @AMDEPBACKSLASH@ 525 - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 526 - @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o console_redirect.o `test -f '$(srcdir)/../console_redirect.c' || echo '$(srcdir)/'`$(srcdir)/../console_redirect.c 527 - 528 - console_redirect.obj: $(srcdir)/../console_redirect.c 529 - @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT console_redirect.obj -MD -MP -MF $(DEPDIR)/console_redirect.Tpo -c -o console_redirect.obj `if test -f '$(srcdir)/../console_redirect.c'; then $(CYGPATH_W) '$(srcdir)/../console_redirect.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../console_redirect.c'; fi` 530 - @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/console_redirect.Tpo $(DEPDIR)/console_redirect.Po 531 - @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../console_redirect.c' object='console_redirect.obj' libtool=no @AMDEPBACKSLASH@ 532 - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 533 - @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o console_redirect.obj `if test -f '$(srcdir)/../console_redirect.c'; then $(CYGPATH_W) '$(srcdir)/../console_redirect.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../console_redirect.c'; fi` 534 510 install-launchdaemonsDATA: $(launchdaemons_DATA) 535 511 @$(NORMAL_INSTALL) 536 512 @list='$(launchdaemons_DATA)'; test -n "$(launchdaemonsdir)" || list=; \
-9
app/xinit/launchd/privileged_startx/privileged_startx.plist.cpp
··· 10 10 <string>-d</string> 11 11 <string>SCRIPTDIR</string> 12 12 </array> 13 - #ifdef TIGER_LAUNCHD 14 - <key>RunAtLoad</key> 15 - <true/> 16 - <key>KeepAlive</key> 17 - <true/> 18 - <key>ServiceIPC</key> 19 - <true/> 20 - #else 21 13 <key>MachServices</key> 22 14 <dict> 23 15 <key>BUNDLE_ID_PREFIX.privileged_startx</key> ··· 27 19 <integer>120</integer> 28 20 <key>EnableTransactions</key> 29 21 <true/> 30 - #endif 31 22 </dict> 32 23 </plist>
+3 -5
app/xinit/launchd/privileged_startx/server.c
··· 46 46 #include <asl.h> 47 47 #include <errno.h> 48 48 49 - #include "console_redirect.h" 50 - 51 49 #include "privileged_startx.h" 52 50 #include "privileged_startxServer.h" 53 51 ··· 137 135 } 138 136 139 137 if (launch_data_get_type(config) == LAUNCH_DATA_ERRNO) { 140 - asl_log(NULL, NULL, ASL_LEVEL_ERR, "launchd checkin failed eith error: %d %s", launch_data_get_errno(config), strerror(launch_data_get_errno(config))); 138 + asl_log(NULL, NULL, ASL_LEVEL_ERR, "launchd checkin failed with error: %d %s", launch_data_get_errno(config), strerror(launch_data_get_errno(config))); 141 139 exit(EXIT_FAILURE); 142 140 } 143 141 ··· 153 151 } 154 152 155 153 aslc = asl_open(labelstr, BUNDLE_ID_PREFIX, ASL_OPT_NO_DELAY); 156 - xi_asl_capture_fd(aslc, NULL, ASL_LEVEL_INFO, STDOUT_FILENO); 157 - xi_asl_capture_fd(aslc, NULL, ASL_LEVEL_NOTICE, STDERR_FILENO); 154 + asl_log_descriptor(aslc, NULL, ASL_LEVEL_INFO, STDOUT_FILENO, ASL_LOG_DESCRIPTOR_WRITE); 155 + asl_log_descriptor(aslc, NULL, ASL_LEVEL_NOTICE, STDERR_FILENO, ASL_LOG_DESCRIPTOR_WRITE); 158 156 159 157 #ifdef LAUNCH_JOBKEY_MACHSERVICES 160 158 launch_data_t tmv;
-1
app/xinit/launchd/user_startx/Makefile.am
··· 26 26 AM_CPPFLAGS = -I$(srcdir)/.. -DXINITDIR=\"$(xinitrcdir)\" -DBINDIR=\"$(bindir)\" 27 27 28 28 dist_launchd_startx_SOURCES = \ 29 - $(srcdir)/../console_redirect.c \ 30 29 launchd_startx.c 31 30 32 31 CPP_FILES_FLAGS = \
+1 -22
app/xinit/launchd/user_startx/Makefile.in
··· 95 95 am__installdirs = "$(DESTDIR)$(libexecdir)" \ 96 96 "$(DESTDIR)$(launchagentsdir)" 97 97 PROGRAMS = $(libexec_PROGRAMS) 98 - dist_launchd_startx_OBJECTS = console_redirect.$(OBJEXT) \ 99 - launchd_startx.$(OBJEXT) 98 + dist_launchd_startx_OBJECTS = launchd_startx.$(OBJEXT) 100 99 launchd_startx_OBJECTS = $(dist_launchd_startx_OBJECTS) 101 100 launchd_startx_LDADD = $(LDADD) 102 101 AM_V_P = $(am__v_P_@AM_V@) ··· 115 114 depcomp = $(SHELL) $(top_srcdir)/depcomp 116 115 am__depfiles_maybe = depfiles 117 116 am__mv = mv -f 118 - AM_V_lt = $(am__v_lt_@AM_V@) 119 - am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) 120 - am__v_lt_0 = --silent 121 - am__v_lt_1 = 122 117 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ 123 118 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) 124 119 AM_V_CC = $(am__v_CC_@AM_V@) ··· 327 322 SUFFIXES = .cpp 328 323 AM_CPPFLAGS = -I$(srcdir)/.. -DXINITDIR=\"$(xinitrcdir)\" -DBINDIR=\"$(bindir)\" 329 324 dist_launchd_startx_SOURCES = \ 330 - $(srcdir)/../console_redirect.c \ 331 325 launchd_startx.c 332 326 333 327 CPP_FILES_FLAGS = -D__libexecdir__="$(libexecdir)" \ ··· 425 419 distclean-compile: 426 420 -rm -f *.tab.c 427 421 428 - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/console_redirect.Po@am__quote@ 429 422 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/launchd_startx.Po@am__quote@ 430 423 431 424 .c.o: ··· 441 434 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ 442 435 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 443 436 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` 444 - 445 - console_redirect.o: $(srcdir)/../console_redirect.c 446 - @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT console_redirect.o -MD -MP -MF $(DEPDIR)/console_redirect.Tpo -c -o console_redirect.o `test -f '$(srcdir)/../console_redirect.c' || echo '$(srcdir)/'`$(srcdir)/../console_redirect.c 447 - @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/console_redirect.Tpo $(DEPDIR)/console_redirect.Po 448 - @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../console_redirect.c' object='console_redirect.o' libtool=no @AMDEPBACKSLASH@ 449 - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 450 - @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o console_redirect.o `test -f '$(srcdir)/../console_redirect.c' || echo '$(srcdir)/'`$(srcdir)/../console_redirect.c 451 - 452 - console_redirect.obj: $(srcdir)/../console_redirect.c 453 - @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT console_redirect.obj -MD -MP -MF $(DEPDIR)/console_redirect.Tpo -c -o console_redirect.obj `if test -f '$(srcdir)/../console_redirect.c'; then $(CYGPATH_W) '$(srcdir)/../console_redirect.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../console_redirect.c'; fi` 454 - @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/console_redirect.Tpo $(DEPDIR)/console_redirect.Po 455 - @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../console_redirect.c' object='console_redirect.obj' libtool=no @AMDEPBACKSLASH@ 456 - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 457 - @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o console_redirect.obj `if test -f '$(srcdir)/../console_redirect.c'; then $(CYGPATH_W) '$(srcdir)/../console_redirect.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../console_redirect.c'; fi` 458 437 install-launchagentsDATA: $(launchagents_DATA) 459 438 @$(NORMAL_INSTALL) 460 439 @list='$(launchagents_DATA)'; test -n "$(launchagentsdir)" || list=; \
+7 -4
app/xinit/launchd/user_startx/launchd_startx.c
··· 39 39 #include <stdlib.h> 40 40 #include <spawn.h> 41 41 42 - #include "console_redirect.h" 43 - 44 42 int main(int argc, char **argv, char **envp) { 45 43 aslclient aslc; 46 44 pid_t child; ··· 53 51 54 52 aslc = asl_open(BUNDLE_ID_PREFIX".startx", BUNDLE_ID_PREFIX, ASL_OPT_NO_DELAY); 55 53 56 - xi_asl_capture_fd(aslc, NULL, ASL_LEVEL_INFO, STDOUT_FILENO); 57 - xi_asl_capture_fd(aslc, NULL, ASL_LEVEL_NOTICE, STDERR_FILENO); 54 + asl_log_descriptor(aslc, NULL, ASL_LEVEL_INFO, STDOUT_FILENO, ASL_LOG_DESCRIPTOR_WRITE); 55 + asl_log_descriptor(aslc, NULL, ASL_LEVEL_NOTICE, STDERR_FILENO, ASL_LOG_DESCRIPTOR_WRITE); 56 + 57 + /* https://github.com/XQuartz/XQuartz/issues/114 */ 58 + char const * const home = getenv("HOME"); 59 + assert(home); 60 + chdir(home); 58 61 59 62 assert(posix_spawnp(&child, argv[1], NULL, NULL, &argv[1], envp) == 0); 60 63 wait4(child, &pstat, 0, (struct rusage *)0);
+29 -13
app/xinit/man/startx.man
··· 71 71 .PP 72 72 To determine the client to run, 73 73 .B startx 74 - looks for the following files, in order: 75 - .RS 76 - .PP 77 - .I $(HOME)/.startxrc 78 - .PP 79 - .I __libdir__/sys.startxrc 80 - .PP 81 - .I $(HOME)/.xinitrc 82 - .PP 83 - .I __xinitdir__/xinitrc 84 - .RE 85 - .PP 74 + first checks the environment variable 75 + .I XINITRC 76 + for a filename. If that variable is unset, or does not contain a filename, 77 + it looks for a file called 78 + .I .xinitrc 79 + in the user's home directory. If that is not found, it uses 80 + the file 81 + .I xinitrc 82 + in the 83 + .I xinit 84 + library directory. 86 85 If command line client options are given, they override this 87 86 behavior and revert to the 88 87 .BR xinit (__appmansuffix__) 89 88 behavior. 90 89 To determine the server to run, 91 90 .B startx 92 - first looks for a file called 91 + checks the environment variable 92 + .I XSERVERRC 93 + for a filename. If that variable is unset, or does not contain a filename, 94 + it looks for a file called 93 95 .I .xserverrc 94 96 in the user's home directory. If that is not found, it uses 95 97 the file ··· 165 167 and 166 168 .IR Xsecurity (__miscmansuffix__) 167 169 manual pages for more information on X client/server authentication. 170 + .TP 25 171 + XINITRC 172 + This variable should contain the location of an xinitrc file. If unset, 173 + .I $(HOME)/.xinitrc 174 + or 175 + .I __xinitdir__/xinitrc 176 + will be used. 177 + .TP 25 178 + XSERVERRC 179 + This variable should contain the location of an xserver file. If unset, 180 + .I $(HOME)/.xinitrc 181 + or 182 + .I __xinitdir__/xserverrc 183 + will be used. 168 184 .SH FILES 169 185 .TP 25 170 186 .I $(HOME)/.xinitrc
+1 -1
app/xinit/man/xinit.man
··· 120 120 This will use the command \fI\./Xorg \-l \-c\fP to start the server and will 121 121 append the arguments \fI\-e widgets\fP to the default \fIxterm\fP command. 122 122 .TP 8 123 - .B "xinit /usr/ucb/rsh fasthost cpupig \-display ws:1 \-\^\- :1 \-a 2 \-t 5" 123 + .B "xinit /usr/bin/ssh \-X fasthost cpupig \-\^\- :1 \-a 2 \-t 5" 124 124 This will start a server named \fIX\fP on display 1 with the arguments 125 125 \fI\-a 2 \-t 5\fP. It will then start a remote shell on the machine 126 126 \fBfasthost\fP in which it will run the command \fIcpupig\fP, telling it
+17 -26
app/xinit/startx.cpp
··· 2 2 3 3 XCOMM 4 4 XCOMM This is just a sample implementation of a slightly less primitive 5 - XCOMM interface than xinit. It looks for user .xinitrc and .xserverrc 6 - XCOMM files, then system xinitrc and xserverrc files, else lets xinit choose 7 - XCOMM its default. The system xinitrc should probably do things like check 8 - XCOMM for .Xresources files and merge them in, start up a window manager, 9 - XCOMM and pop a clock and several xterms. 5 + XCOMM interface than xinit. It looks for XINITRC and XSERVERRC environment 6 + XCOMM variables, then user .xinitrc and .xserverrc files, and then system 7 + XCOMM xinitrc and xserverrc files, else lets xinit choose its default. 8 + XCOMM The system xinitrc should probably do things like check for 9 + XCOMM .Xresources files and merge them in, start up a window manager, and 10 + XCOMM pop a clock and several xterms. 10 11 XCOMM 11 12 XCOMM Site administrators are STRONGLY urged to write nicer versions. 12 13 XCOMM 13 14 14 - unset DBUS_SESSION_BUS_ADDRESS 15 15 unset SESSION_MANAGER 16 16 17 17 #ifdef __APPLE__ ··· 48 48 #endif 49 49 50 50 userclientrc=$HOME/.xinitrc 51 + [ -f "${XINITRC}" ] && userclientrc="${XINITRC}" 51 52 sysclientrc=XINITDIR/xinitrc 52 53 53 54 userserverrc=$HOME/.xserverrc 55 + [ -f "${XSERVERRC}" ] && userclientrc="${XSERVERRC}" 54 56 sysserverrc=XINITDIR/xserverrc 55 57 defaultclient=XTERM 56 58 defaultserver=XSERVER ··· 87 89 XCOMM First, start caching fonts 88 90 if [ x`defaults read $X11_PREFS_DOMAIN cache_fonts` = x1 ] ; then 89 91 if [ -x $bindir/font_cache ] ; then 90 - $bindir/font_cache & 92 + $bindir/font_cache 91 93 elif [ -x $bindir/font_cache.sh ] ; then 92 - $bindir/font_cache.sh & 94 + $bindir/font_cache.sh 93 95 elif [ -x $bindir/fc-cache ] ; then 94 - $bindir/fc-cache & 96 + $bindir/fc-cache 95 97 fi 96 98 fi 97 99 98 100 if [ -x __libexecdir__/privileged_startx ] ; then 99 - # Don't push this into the background becasue it can cause 100 - # a race to create /tmp/.X11-unix 101 + XCOMM Don't push this into the background because it can cause 102 + XCOMM a race to create /tmp/.X11-unix 101 103 __libexecdir__/privileged_startx 102 104 fi 103 105 ··· 114 116 fi 115 117 116 118 if [ x`defaults read $X11_PREFS_DOMAIN enable_iglx` = x1 ] ; then 117 - defaultserverargs="$defaultserverargs +iglx" 119 + defaultserverargs="$defaultserverargs +iglx +extension GLX" 118 120 else 119 121 defaultserverargs="$defaultserverargs -iglx" 120 122 fi ··· 206 208 XCOMM "https://bugzilla.redhat.com/show_bug.cgi?id=806491" 207 209 tty=$(tty) 208 210 if expr "$tty" : '/dev/tty[0-9][0-9]*$' > /dev/null; then 209 - tty_num=$(echo "$tty" | grep -oE '[0-9]+$') 211 + tty_num=${tty#/dev/tty} 210 212 vtarg="vt$tty_num -keeptty" 211 213 fi 212 214 #endif ··· 251 253 removelist= 252 254 253 255 XCOMM set up default Xauth info for this machine 254 - case `uname` in 255 - Linux*) 256 - if [ -z "`hostname --version 2>&1 | grep GNU`" ]; then 257 - hostname=`hostname -f` 258 - else 259 - hostname=`hostname` 260 - fi 261 - ;; 262 - *) 263 - hostname=`hostname` 264 - ;; 265 - esac 256 + hostname=`uname -n` 266 257 267 258 authdisplay=${display:-:0} 268 259 #if defined(HAS_COOKIE_MAKER) && defined(MK_COOKIE) ··· 282 273 283 274 XCOMM create a file with auth information for the server. ':0' is a dummy. 284 275 xserverauthfile=`mktemp ${HOME}/.serverauth.XXXXXXXXXX` 285 - trap "rm -f '$xserverauthfile'" HUP INT QUIT ILL TRAP KILL BUS TERM 276 + trap "rm -f '$xserverauthfile'" HUP INT QUIT ILL TRAP BUS TERM 286 277 xauth -q -f "$xserverauthfile" << EOF 287 278 add :$dummy . $mcookie 288 279 EOF
+1 -1
app/xinit/xinit.c
··· 263 263 /* 264 264 * Start the server and client. 265 265 */ 266 - signal(SIGCHLD, SIG_DFL); /* Insurance */ 267 266 268 267 /* Let those signal interrupt the wait() call in the main loop */ 269 268 memset(&sa, 0, sizeof sa); ··· 284 283 285 284 sigaction(SIGALRM, &si, NULL); 286 285 sigaction(SIGUSR1, &si, NULL); 286 + sigaction(SIGCHLD, &si, NULL); 287 287 288 288 #ifdef __APPLE__ 289 289 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060