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 <keithp@keithp.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
This commit is contained in:
Keith Packard 2014-04-18 15:00:35 -07:00
parent 0c0feddbcd
commit 4957e98684

View File

@ -356,6 +356,7 @@ NotifyParentProcess(void)
write(displayfd, display, strlen(display));
write(displayfd, "\n", 1);
close(displayfd);
displayfd = -1;
}
if (RunFromSmartParent) {
if (ParentProcess > 1) {