windows-spawn: Improve errno upon failure on native Windows.
commitad6d18b5699f75d9fb356b1ef6ea0ed4c50e0216
authorBruno Haible <bruno@clisp.org>
Thu, 24 Dec 2020 17:19:08 +0000 (24 18:19 +0100)
committerBruno Haible <bruno@clisp.org>
Thu, 24 Dec 2020 17:19:08 +0000 (24 18:19 +0100)
tree8dd06d8301b0f82f8d160fb7eda1b04739793235
parentd9c121346a283503350c0ac7cd6eb5092e87181b
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.
ChangeLog
lib/windows-spawn.c
modules/execute-tests
modules/posix_spawn-tests
modules/posix_spawnp-tests
modules/spawn-pipe-tests
tests/executable-script.sh [new file with mode: 0755]
tests/test-execute-script.c
tests/test-posix_spawn-script.c
tests/test-posix_spawnp-script.c
tests/test-spawn-pipe-script.c