[PATCH] anaconda: Disable X server regenerations (#609245)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Otherwise, we lose arbitrary amounts of X server state, since we're not
waiting for metacity before carrying on; and any driver bugs that cause
crashes on regeneration will cause graphical install to fail entirely.

This varies slightly from the usual policy of doing what the installed
system would do, but I'm willing to turn a blind eye.  The more correct
fix would be waiting for one of the properties metacity creates to exist
on the root window.  This is harder than you think.

Signed-off-by: Adam Jackson <ajax@xxxxxxxxxx>
---
 anaconda |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/anaconda b/anaconda
index c01260e..0fe26e8 100755
--- a/anaconda
+++ b/anaconda
@@ -36,6 +36,7 @@ from tempfile import mkstemp
 
 # keep up with process ID of the window manager if we start it
 wm_pid = None
+xserver_pid = None
 
 # Make sure messages sent through python's warnings module get logged.
 def AnacondaShowWarning(message, category, filename, lineno, file=sys.stderr, line=None):
@@ -120,6 +121,7 @@ def set_x_resolution(runres):
 
 def doShutdownX11Actions():
     global wm_pid
+    global xserver_pid
     
     if wm_pid is not None:
         try:
@@ -128,6 +130,13 @@ def doShutdownX11Actions():
         except:
             pass
 
+    if xserver_pid is not None:
+        try:
+            os.kill(xserver_pid, 15)
+            os.waitpid(xserver_pid, 0)
+        except:
+            pass
+
 def setupPythonUpdates():
     from distutils.sysconfig import get_python_lib
 
@@ -533,7 +542,6 @@ if __name__ == "__main__":
     graphical_failed = 0
     vncS = vnc.VncServer()          # The vnc Server object.
     vncS.anaconda = anaconda
-    xserver_pid = None
 
     (opts, args) = parseOptions()
 
@@ -783,7 +791,8 @@ if __name__ == "__main__":
 
             proc = subprocess.Popen(["Xorg", "-br", "-logfile", "/tmp/X.log",
                                      ":1", "vt6", "-s", "1440", "-ac",
-                                     "-nolisten", "tcp", "-dpi", "96"],
+                                     "-nolisten", "tcp", "-dpi", "96",
+                                     "-noreset"],
                                      close_fds=True, stdout=xout, stderr=xout,
                                      preexec_fn=preexec_fn)
 
-- 
1.7.0.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux