aboutsummaryrefslogtreecommitdiff
path: root/posix
diff options
context:
space:
mode:
Diffstat (limited to 'posix')
-rw-r--r--posix/Makefile1
-rw-r--r--posix/tst-spawn3.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/posix/Makefile b/posix/Makefile
index 4a9a1b5..989e42e 100644
--- a/posix/Makefile
+++ b/posix/Makefile
@@ -256,6 +256,7 @@ tst-pcre-ARGS = PCRE.tests
tst-boost-ARGS = BOOST.tests
bug-glob1-ARGS = "$(objpfx)"
tst-execvp3-ARGS = --test-dir=$(objpfx)
+CFLAGS-tst-spawn3.c += -DOBJPFX=\"$(objpfx)\"
testcases.h: TESTS TESTS2C.sed
LC_ALL=C sed -f TESTS2C.sed < $< > $@T
diff --git a/posix/tst-spawn3.c b/posix/tst-spawn3.c
index dc6bed5..b60a783 100644
--- a/posix/tst-spawn3.c
+++ b/posix/tst-spawn3.c
@@ -82,8 +82,8 @@ do_test (void)
if (posix_spawn_file_actions_init (&a) != 0)
FAIL_EXIT1 ("posix_spawn_file_actions_init");
- /* Executes a /bin/sh echo $$ 2>&1 > /tmp/tst-spawn3.pid . */
- const char pidfile[] = "/tmp/tst-spawn3.pid";
+ /* Executes a /bin/sh echo $$ 2>&1 > ${objpfx}tst-spawn3.pid . */
+ const char pidfile[] = OBJPFX "tst-spawn3.pid";
if (posix_spawn_file_actions_addopen (&a, STDOUT_FILENO, pidfile, O_WRONLY |
O_CREAT | O_TRUNC, 0644) != 0)
FAIL_EXIT1 ("posix_spawn_file_actions_addopen");