From: Keith Packard Date: Fri, 18 Apr 2014 22:00:35 +0000 (-0700) Subject: os: Clear the -displayfd option after closing the file X-Git-Tag: upstream/1.16~117 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4957e986841225e9984daca76f1a0ee08df125bb;p=platform%2Fupstream%2Fxorg-server.git 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 --- 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) {