Hash :
ad6d18b5
Author :
Date :
2020-12-24T18:19:08
windows-spawn: Improve errno upon failure on native Windows. * lib/windows-spawn.c (spawnpvech): Map the CreateProcess errors ERROR_BAD_FORMAT and ERROR_BAD_EXE_FORMAT to ENOEXEC. * tests/executable-script.sh: New file. * tests/test-posix_spawn-script.c (main): Also try executing executable-script.sh. * tests/test-posix_spawnp-script.c (main): Likewise. * tests/test-execute-script.c (main): Likewise. * tests/test-spawn-pipe-script.c (main): Likewise. * modules/posix_spawn-tests (Files): Add tests/executable-script.sh. * modules/posix_spawnp-tests (Files): Likewise. * modules/execute-tests (Files): Likewise. * modules/spawn-pipe-tests (Files): Likewise.
Files:
tests/test-spawn-pipe.sh
tests/test-spawn-pipe-main.c
tests/test-spawn-pipe-child.c
tests/test-spawn-pipe-script.c
tests/executable-script
tests/executable-script.sh
tests/executable-shell-script
tests/macros.h
Depends-on:
close
msvc-inval
stdint
configure.ac:
Makefile.am:
TESTS += test-spawn-pipe.sh
check_PROGRAMS += test-spawn-pipe-main test-spawn-pipe-child
test_spawn_pipe_main_LDADD = $(LDADD) @LIBINTL@ $(LIBTHREAD)
# The test-spawn-pipe-child program must be a real executable, not a libtool
# wrapper script, and should link against as few libraries as possible.
# Therefore don't link it against any libraries other than -lc.
test_spawn_pipe_child_LDADD =
TESTS += test-spawn-pipe-script
check_PROGRAMS += test-spawn-pipe-script
test_spawn_pipe_script_LDADD = $(LDADD) @LIBINTL@ $(LIBTHREAD)
test_spawn_pipe_script_CPPFLAGS = $(AM_CPPFLAGS) -DSRCDIR=\"$(srcdir)/\"