diff options
author | Bruno Haible <bruno@clisp.org> | 2003-10-15 10:19:04 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-06-23 12:11:03 +0200 |
commit | 8baec33a32c22b01755b900f30d82e8a885f2cb4 (patch) | |
tree | 4aa6de655587446fe13fa7983e7631f1d448ea92 /gettext-tools/lib/javacomp.c | |
parent | 8ee1e7c35a7586e56f49c09c35247e2bc686bc18 (diff) | |
download | external_gettext-8baec33a32c22b01755b900f30d82e8a885f2cb4.zip external_gettext-8baec33a32c22b01755b900f30d82e8a885f2cb4.tar.gz external_gettext-8baec33a32c22b01755b900f30d82e8a885f2cb4.tar.bz2 |
Kill subprocesses when the main process exits due to SIGHUP or SIGTERM
or similar.
Diffstat (limited to 'gettext-tools/lib/javacomp.c')
-rw-r--r-- | gettext-tools/lib/javacomp.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/gettext-tools/lib/javacomp.c b/gettext-tools/lib/javacomp.c index 6265777..73afa2c 100644 --- a/gettext-tools/lib/javacomp.c +++ b/gettext-tools/lib/javacomp.c @@ -162,7 +162,7 @@ compile_java_class (const char * const *java_sources, argv[2] = command; argv[3] = NULL; exitstatus = execute (javac, "/bin/sh", argv, false, false, false, - true); + true, true); err = (exitstatus != 0); /* Reset CLASSPATH. */ @@ -198,7 +198,8 @@ compile_java_class (const char * const *java_sources, argv[0] = "gcj"; argv[1] = "--version"; argv[2] = NULL; - child = create_pipe_in ("gcj", "gcj", argv, DEV_NULL, true, false, fd); + child = create_pipe_in ("gcj", "gcj", argv, DEV_NULL, true, true, + false, fd); gcj_present = false; if (child != -1) { @@ -235,7 +236,7 @@ compile_java_class (const char * const *java_sources, /* Remove zombie process from process list, and retrieve exit status. */ - exitstatus = wait_subprocess (child, "gcj", true, false); + exitstatus = wait_subprocess (child, "gcj", true, true, false); if (exitstatus != 0) gcj_present = false; } @@ -290,7 +291,8 @@ compile_java_class (const char * const *java_sources, free (command); } - exitstatus = execute ("gcj", "gcj", argv, false, false, false, true); + exitstatus = execute ("gcj", "gcj", argv, false, false, false, true, + true); err = (exitstatus != 0); /* Reset CLASSPATH. */ @@ -312,7 +314,7 @@ compile_java_class (const char * const *java_sources, argv[0] = "javac"; argv[1] = NULL; - exitstatus = execute ("javac", "javac", argv, false, true, true, + exitstatus = execute ("javac", "javac", argv, false, true, true, true, false); javac_present = (exitstatus == 0 || exitstatus == 1 || exitstatus == 2); javac_tested = true; @@ -365,7 +367,7 @@ compile_java_class (const char * const *java_sources, } exitstatus = execute ("javac", "javac", argv, false, false, false, - true); + true, true); err = (exitstatus != 0); /* Reset CLASSPATH. */ @@ -387,7 +389,7 @@ compile_java_class (const char * const *java_sources, argv[0] = "jikes"; argv[1] = NULL; - exitstatus = execute ("jikes", "jikes", argv, false, true, true, + exitstatus = execute ("jikes", "jikes", argv, false, true, true, true, false); jikes_present = (exitstatus == 0 || exitstatus == 1); jikes_tested = true; @@ -442,7 +444,7 @@ compile_java_class (const char * const *java_sources, } exitstatus = execute ("jikes", "jikes", argv, false, false, false, - true); + true, true); err = (exitstatus != 0); /* Reset CLASSPATH. */ |