From 4957e986841225e9984daca76f1a0ee08df125bb Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 18 Apr 2014 15:00:35 -0700 Subject: [PATCH] os: Clear the -displayfd option after closing the file 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 Reviewed-by: Jamey Sharp --- 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) { -- 2.7.4