rpms/xorg-x11-server/devel xserver-1.3.0-late-sigusr1.patch, NONE, 1.1 xorg-x11-server.spec, 1.257, 1.258
Adam Jackson (ajax)
fedora-extras-commits at redhat.com
Mon Oct 15 19:34:54 UTC 2007
Author: ajax
Update of /cvs/pkgs/rpms/xorg-x11-server/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv805
Modified Files:
xorg-x11-server.spec
Added Files:
xserver-1.3.0-late-sigusr1.patch
Log Message:
* Mon Oct 15 2007 Adam Jackson <ajax at redhat.com> 1.3.0.0-31.jx
- xserver-1.3.0-late-sigusr1.patch: Test, move kill(getppid(), SIGUSR1)
as late as possible.
xserver-1.3.0-late-sigusr1.patch:
--- NEW FILE xserver-1.3.0-late-sigusr1.patch ---
diff -up xorg-server-1.3.0.0/dix/main.c.jx xorg-server-1.3.0.0/dix/main.c
--- xorg-server-1.3.0.0/dix/main.c.jx 2006-11-16 13:01:23.000000000 -0500
+++ xorg-server-1.3.0.0/dix/main.c 2007-10-15 14:37:13.000000000 -0400
@@ -442,6 +442,8 @@ main(int argc, char *argv[], char *envp[
FatalError("could not create connection block info");
}
+ NotifyParentProcess();
+
Dispatch();
/* Now free up whatever must be freed */
diff -up xorg-server-1.3.0.0/include/os.h.jx xorg-server-1.3.0.0/include/os.h
--- xorg-server-1.3.0.0/include/os.h.jx 2007-02-16 11:03:12.000000000 -0500
+++ xorg-server-1.3.0.0/include/os.h 2007-10-15 14:37:13.000000000 -0400
@@ -124,6 +124,8 @@ extern void ResetOsBuffers(void);
extern void InitConnectionLimits(void);
+extern void NotifyParentProcess(void);
+
extern void CreateWellKnownSockets(void);
extern void ResetWellKnownSockets(void);
diff -up xorg-server-1.3.0.0/os/connection.c.jx xorg-server-1.3.0.0/os/connection.c
--- xorg-server-1.3.0.0/os/connection.c.jx 2007-02-17 20:37:56.000000000 -0500
+++ xorg-server-1.3.0.0/os/connection.c 2007-10-15 14:42:19.000000000 -0400
@@ -370,6 +370,52 @@ InitConnectionLimits(void)
#endif
}
+/*
+ * If SIGUSR1 was set to SIG_IGN when the server started, assume that either
+ *
+ * a- The parent process is ignoring SIGUSR1
+ *
+ * or
+ *
+ * b- The parent process is expecting a SIGUSR1
+ * when the server is ready to accept connections
+ *
+ * In the first case, the signal will be harmless, in the second case,
+ * the signal will be quite useful.
+ */
+static void
+InitParentProcess(void)
+{
+#if !defined(WIN32)
+ OsSigHandlerPtr handler;
+ handler = OsSignal (SIGUSR1, SIG_IGN);
+ if ( handler == SIG_IGN)
+ RunFromSmartParent = TRUE;
+ OsSignal(SIGUSR1, handler);
+ ParentProcess = getppid ();
+#ifdef __UNIXOS2__
+ /*
+ * fg030505: under OS/2, xinit is not the parent process but
+ * the "grant parent" process of the server because execvpe()
+ * presents us an additional process number;
+ * GetPPID(pid) is part of libemxfix
+ */
+ ParentProcess = GetPPID (ParentProcess);
+#endif /* __UNIXOS2__ */
+#endif
+}
+
+void
+NotifyParentProcess(void)
+{
+#if !defined(WIN32)
+ if (RunFromSmartParent) {
+ if (ParentProcess > 1) {
+ kill (ParentProcess, SIGUSR1);
+ }
+ }
+#endif
+}
/*****************
* CreateWellKnownSockets
@@ -382,7 +428,6 @@ CreateWellKnownSockets(void)
int i;
int partial;
char port[20];
- OsSigHandlerPtr handler;
FD_ZERO(&AllSockets);
FD_ZERO(&AllClients);
@@ -436,42 +481,9 @@ CreateWellKnownSockets(void)
OsSignal (SIGTERM, GiveUp);
XFD_COPYSET (&WellKnownConnections, &AllSockets);
ResetHosts(display);
- /*
- * Magic: If SIGUSR1 was set to SIG_IGN when
- * the server started, assume that either
- *
- * a- The parent process is ignoring SIGUSR1
- *
- * or
- *
- * b- The parent process is expecting a SIGUSR1
- * when the server is ready to accept connections
- *
- * In the first case, the signal will be harmless,
- * in the second case, the signal will be quite
- * useful
- */
-#if !defined(WIN32)
- handler = OsSignal (SIGUSR1, SIG_IGN);
- if ( handler == SIG_IGN)
- RunFromSmartParent = TRUE;
- OsSignal(SIGUSR1, handler);
- ParentProcess = getppid ();
-#ifdef __UNIXOS2__
- /*
- * fg030505: under OS/2, xinit is not the parent process but
- * the "grant parent" process of the server because execvpe()
- * presents us an additional process number;
- * GetPPID(pid) is part of libemxfix
- */
- ParentProcess = GetPPID (ParentProcess);
-#endif /* __UNIXOS2__ */
- if (RunFromSmartParent) {
- if (ParentProcess > 1) {
- kill (ParentProcess, SIGUSR1);
- }
- }
-#endif
+
+ InitParentProcess();
+
#ifdef XDMCP
XdmcpInit ();
#endif
@@ -520,16 +532,7 @@ ResetWellKnownSockets (void)
ResetAuthorization ();
ResetHosts(display);
- /*
- * See above in CreateWellKnownSockets about SIGUSR1
- */
-#if !defined(WIN32)
- if (RunFromSmartParent) {
- if (ParentProcess > 1) {
- kill (ParentProcess, SIGUSR1);
- }
- }
-#endif
+
/*
* restart XDMCP
*/
Index: xorg-x11-server.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-server/devel/xorg-x11-server.spec,v
retrieving revision 1.257
retrieving revision 1.258
diff -u -r1.257 -r1.258
--- xorg-x11-server.spec 12 Oct 2007 14:41:40 -0000 1.257
+++ xorg-x11-server.spec 15 Oct 2007 19:34:20 -0000 1.258
@@ -9,7 +9,7 @@
Summary: X.Org X11 X server
Name: xorg-x11-server
Version: 1.3.0.0
-Release: 31%{?dist}
+Release: 32%{?dist}
URL: http://www.x.org
License: MIT
Group: User Interface/X
@@ -83,6 +83,8 @@
Patch2504: xserver-1.3.0-domain-obiwan.patch
Patch2505: xserver-1.3.0-pci-device-enable.patch
+Patch9999: xserver-1.3.0-late-sigusr1.patch
+
%define moduledir %{_libdir}/xorg/modules
%define drimoduledir %{_libdir}/dri
%define sdkdir %{_includedir}/xorg
@@ -345,6 +347,8 @@
%patch2504 -p1 -b .domain-obiwan
%patch2505 -p1 -b .device-enable
+%patch9999 -p1 -b .jx
+
%build
%if %{fedora} == 7
@@ -612,6 +616,10 @@
%changelog
+* Mon Oct 15 2007 Adam Jackson <ajax at redhat.com> 1.3.0.0-31.jx
+- xserver-1.3.0-late-sigusr1.patch: Test, move kill(getppid(), SIGUSR1)
+ as late as possible.
+
* Fri Oct 12 2007 Adam Jackson <ajax at redhat.com> 1.3.0.0-31
- xorg-x11-server-Red-Hat-extramodes.patch: Remove 2560x1600 GTF timing.
More information about the fedora-extras-commits
mailing list