summaryrefslogtreecommitdiffstats
path: root/shared
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2024-04-08 15:37:42 +0300
committerMarius Vlad <marius.vlad@collabora.com>2024-04-09 11:41:36 +0300
commit18607e2245d1e9ccfdd19db894e4cfdb52def303 (patch)
treeb9a62e4ab81bd33fb6af5c996f92ad756536f57d /shared
parent50f3305cfa8ef0713fbabdc9670e6856f7d8e69e (diff)
compositor: Add support for building Xwayland
This updates with the Weston's front-end. Bug-AGL: SPEC-5096, SPEC-5061 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Id421bdd04fc6943e991cbf51e9478450411721ef
Diffstat (limited to 'shared')
-rw-r--r--shared/process-util.c3
-rw-r--r--shared/process-util.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/shared/process-util.c b/shared/process-util.c
index e36c647..fe895d2 100644
--- a/shared/process-util.c
+++ b/shared/process-util.c
@@ -68,7 +68,8 @@ fdstr_close_all(struct fdstr *s)
unsigned i;
for (i = 0; i < ARRAY_LENGTH(s->fds); i++) {
- close(s->fds[i]);
+ if (s->fds[i] >= 0)
+ close(s->fds[i]);
s->fds[i] = -1;
}
}
diff --git a/shared/process-util.h b/shared/process-util.h
index 05543f6..aa35c77 100644
--- a/shared/process-util.h
+++ b/shared/process-util.h
@@ -59,6 +59,7 @@ fdstr_clear_cloexec_fd1(struct fdstr *s);
void
fdstr_close_all(struct fdstr *s);
+#define FDSTR_INIT ((struct fdstr){ { 0 }, { -1, -1 }})
/**
* A container for environment variables and/or process arguments, designed to