aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/os/connection.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/os/connection.c')
-rw-r--r--xorg-server/os/connection.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/xorg-server/os/connection.c b/xorg-server/os/connection.c
index b39969dcd..505552d19 100644
--- a/xorg-server/os/connection.c
+++ b/xorg-server/os/connection.c
@@ -380,9 +380,12 @@ NotifyParentProcess(void)
{
#if !defined(WIN32)
if (displayfd >= 0) {
- write(displayfd, display, strlen(display));
- write(displayfd, "\n", 1);
+ if (write(displayfd, display, strlen(display)) != strlen(display))
+ FatalError("Cannot write display number to fd %d\n", displayfd);
+ if (write(displayfd, "\n", 1) != 1)
+ FatalError("Cannot write display number to fd %d\n", displayfd);
close(displayfd);
+ displayfd = -1;
}
if (RunFromSmartParent) {
if (ParentProcess > 1) {