forked from pool/xinit
Stefan Dirsch
3bb28eaf77
- Fixed some spacing and single quote vs backtick issues in patches - Corrections to variable names in xinit-suse.patch and xinit-tolerant-hostname-changes.patch - Update to version 1.3.4: + Changes from 1.3.3 - Fix warnings about parameters to startServer & startClient shadowing globals - Pass files to cpp via CLI arg instead of stdin to workaround gcc 4.8 change (fdo#69439) - Remove unixware / sco support - Bump required util-macros version to 1.19 - Replace $RAWCPPFLAGS with $TRADITIONALCPPFLAGS when processing cpp files - Under Linux start X on the current VT (rh#806491) - startx; Pass vtX as long as the user did not specify one - configure: Drop AM_MAINTAINER_MODE - autogen.sh: Honor NOCONFIGURE=1 - startx: Make the bugzilla reference in a comment survive cpp processing (fdo#83019) - Remove hardcoded path to OpenSSL for OpenBSD + Patches refactored/renamed for version change + Added: - xinit-client-session.patch - xinit-tolerant-hostname-changes.patch - xinit-suse.patch - xinit-1.3.4.tar.bz2 + Modified: - xinit-client-session.patch + Dropped: - xinit-tolerant-hostname-changes.diff - xinit-suse.diff - xinit-1.3.3.tar.bz2 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xinit?expand=0&rev=19
41 lines
1.1 KiB
Diff
41 lines
1.1 KiB
Diff
Index: xinit-1.3.4/xinit.c
|
|
===================================================================
|
|
--- xinit-1.3.4.orig/xinit.c
|
|
+++ xinit-1.3.4/xinit.c
|
|
@@ -89,6 +89,7 @@ char xserverrcbuf[256];
|
|
|
|
#define TRUE 1
|
|
#define FALSE 0
|
|
+#define ERR_EXIT 1
|
|
|
|
static char *default_server = "X";
|
|
static char *default_display = ":0"; /* choose most efficient */
|
|
@@ -560,6 +561,8 @@ startClient(char *client_argv[])
|
|
{
|
|
clientpid = fork();
|
|
if (clientpid == 0) {
|
|
+ int fd;
|
|
+
|
|
set_environment();
|
|
setWindowPath();
|
|
|
|
@@ -567,7 +570,17 @@ startClient(char *client_argv[])
|
|
Error("cannot change uid");
|
|
_exit(EXIT_FAILURE);
|
|
}
|
|
- setpgid(0, getpid());
|
|
+
|
|
+ fd = open ("/dev/null", O_RDONLY);
|
|
+ if (fd < 0) {
|
|
+ Error("cannot open /dev/null: %s\n", strerror(errno));
|
|
+ _exit(ERR_EXIT);
|
|
+ }
|
|
+ close (STDIN_FILENO);
|
|
+ dup2 (fd, STDIN_FILENO);
|
|
+ close (fd);
|
|
+ setsid();
|
|
+
|
|
Execute(client_argv);
|
|
Error("Unable to run program \"%s\"", client_argv[0]);
|
|
|