[PATCH 4/8] os: Clear the -displayfd option after closing the file

Keith Packard keithp at keithp.com
Fri Apr 18 15:21:51 PDT 2014


Failing to clear this means that we'll attempt to write the display
number to a random file descriptor on subsequent X server generations.

Signed-off-by: Keith Packard <keithp at keithp.com>
---
 os/connection.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/os/connection.c b/os/connection.c
index e914d9d..5294e59 100644
--- a/os/connection.c
+++ b/os/connection.c
@@ -356,6 +356,7 @@ NotifyParentProcess(void)
         write(displayfd, display, strlen(display));
         write(displayfd, "\n", 1);
         close(displayfd);
+        displayfd = -1;
     }
     if (RunFromSmartParent) {
         if (ParentProcess > 1) {
-- 
1.9.2



More information about the xorg-devel mailing list