summaryrefslogtreecommitdiff
path: root/lib/csharpexec.c
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2020-12-02 17:44:04 +0100
committerBruno Haible <bruno@clisp.org>2020-12-02 17:44:58 +0100
commit702cba00f4ff7b22f0684a23db0fb66aea2c4086 (patch)
tree70d1a7a885bc8cbf61a0512f903588c481c5a2ca /lib/csharpexec.c
parenta10b317852a1bfbc7f26818ced908aa654709f0a (diff)
downloadgnulib-702cba00f4ff7b22f0684a23db0fb66aea2c4086.tar.gz
execute: Allow caller to specify directory for the subprocess.
* lib/execute.h (execute): Add directory argument. * lib/execute.c: Include canonicalize.h, filename.h, findprog.h. (execute): Add directory argument. If specified, resolve the program file name and make it absolute, first. Pass the directory to spawnpvech and posix_spawn_file_actions_addchdir. * modules/execute (Depends-on): Add canonicalize, filename, findprog-in, posix_spawn, posix_spawn_file_actions_addchdir. * tests/test-execute-main.c: Add test for passing a directory. * tests/test-execute-child.c: Likewise. * tests/test-execute.sh: Update. * modules/execute-tests (Depends-on): Add mkdir. * NEWS: Mention the change. * lib/csharpcomp.c (compile_csharp_using_sscli): Update. * lib/csharpexec.c (execute_csharp_using_mono, execute_csharp_using_sscli): Update. * lib/javacomp.c (compile_using_envjavac, compile_using_gcj, compile_using_javac, compile_using_jikes, is_javac_present, is_jikes_present): Update. * lib/javaexec.c (execute_java_class): Update.
Diffstat (limited to 'lib/csharpexec.c')
-rw-r--r--lib/csharpexec.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/csharpexec.c b/lib/csharpexec.c
index b54f14e526..5e2aa2c753 100644
--- a/lib/csharpexec.c
+++ b/lib/csharpexec.c
@@ -106,7 +106,8 @@ execute_csharp_using_mono (const char *assembly_path,
argv[0] = "mono";
argv[1] = "--version";
argv[2] = NULL;
- exitstatus = execute ("mono", "mono", argv, false, false, true, true,
+ exitstatus = execute ("mono", "mono", argv, NULL,
+ false, false, true, true,
true, false, NULL);
mono_present = (exitstatus == 0);
mono_tested = true;
@@ -167,7 +168,8 @@ execute_csharp_using_sscli (const char *assembly_path,
argv[0] = "clix";
argv[1] = NULL;
- exitstatus = execute ("clix", "clix", argv, false, false, true, true,
+ exitstatus = execute ("clix", "clix", argv, NULL,
+ false, false, true, true,
true, false, NULL);
clix_present = (exitstatus == 0 || exitstatus == 1);
clix_tested = true;