[glib: 1/2] glib spawn-singlethread test only if F_DUPFD_CLOEXEC is defined
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 1/2] glib spawn-singlethread test only if F_DUPFD_CLOEXEC is defined
- Date: Fri, 14 May 2021 18:51:52 +0000 (UTC)
commit d3207660bbf000b08fd58559c160f16d9024511b
Author: Claes Nästén <pekdon gmail com>
Date: Fri May 14 20:24:10 2021 +0200
glib spawn-singlethread test only if F_DUPFD_CLOEXEC is defined
F_DUPFD_CLOEXEC is not available on Solaris 10, no need to fail the
build instead skip the test as on non Unix platforms already.
glib/tests/spawn-singlethread.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/glib/tests/spawn-singlethread.c b/glib/tests/spawn-singlethread.c
index 51a1da514..dc38729e0 100644
--- a/glib/tests/spawn-singlethread.c
+++ b/glib/tests/spawn-singlethread.c
@@ -433,7 +433,7 @@ test_spawn_nonexistent (void)
static void
test_spawn_fd_assignment_clash (void)
{
-#ifdef G_OS_UNIX
+#if defined(G_OS_UNIX) && defined(F_DUPFD_CLOEXEC)
int tmp_fd;
guint i;
const guint n_fds = 10;
@@ -487,7 +487,7 @@ test_spawn_fd_assignment_clash (void)
for (i = 0; i < n_fds; i++)
g_close (source_fds[i], NULL);
#else /* !G_OS_UNIX */
- g_test_skip ("FD redirection only supported on Unix");
+ g_test_skip ("FD redirection only supported on Unix with F_DUPFD_CLOEXEC");
#endif /* !G_OS_UNIX */
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]