summaryrefslogtreecommitdiff
path: root/os
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2014-04-18 15:00:35 -0700
committerKeith Packard <keithp@keithp.com>2014-04-18 16:30:17 -0700
commit4957e986841225e9984daca76f1a0ee08df125bb (patch)
treec2ca498f673ea4a5c1505247ce823ac5dde06086 /os
parent0c0feddbcda238efa82a47f456ef3008ffa53195 (diff)
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>
Diffstat (limited to 'os')
-rw-r--r--os/connection.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/os/connection.c b/os/connection.c
index e914d9d94..5294e5955 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) {