diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2013-10-12 00:07:33 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2013-10-12 00:07:33 +0000 |
commit | 27728a48d661e9ee546cc95aae8fa52050eefb29 (patch) | |
tree | 89450fc22b530dc592134ac18405180eeafe13b3 | |
parent | 6d38e5b12b460d1d7f0a6eafe1410f7121e04002 (diff) | |
download | gnunet-27728a48d661e9ee546cc95aae8fa52050eefb29.tar.gz gnunet-27728a48d661e9ee546cc95aae8fa52050eefb29.zip |
- change --enable-ll to --enable-supermuc
- define a system wide termination signal GNUNET_TERM_SIG. Set this to SIGUSR1 only when building for SuperMUC
34 files changed, 81 insertions, 65 deletions
diff --git a/configure.ac b/configure.ac index 2e191abf3..2e0bda700 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1036,22 +1036,21 @@ AC_DEFINE_UNQUOTED([HAVE_GNUTLS], $gnutls, [We have gnutls]) | |||
1036 | 1036 | ||
1037 | 1037 | ||
1038 | # Test if we are building for superMUC | 1038 | # Test if we are building for superMUC |
1039 | AC_MSG_CHECKING(if testbed should use IBM LoadLeveler to run on SuperMUC) | 1039 | AC_MSG_CHECKING(if GNUnet is being configured to run on the SuperMUC) |
1040 | AC_ARG_ENABLE([ll], | 1040 | AC_ARG_ENABLE([supermuc], |
1041 | [AS_HELP_STRING([--enable-ll], | 1041 | [AS_HELP_STRING([--enable-supermuc], |
1042 | [build GNUnet testbed for use with IBM LoadLeveler for running testbed on | 1042 | [build GNUnet with support to run on the SuperMUC (default is NO)])], |
1043 | SuperMUC (default is NO)])], | 1043 | [if test "x$enable_supermuc" = "xno" |
1044 | [if test "x$enable_ll" = "xno" | ||
1045 | then | 1044 | then |
1046 | ll=0 | 1045 | supermuc=0 |
1047 | else | 1046 | else |
1048 | ll=1 | 1047 | supermuc=1 |
1049 | fi], | 1048 | fi], |
1050 | [ll=0 | 1049 | [supermuc=0 |
1051 | enable_ll=no]) | 1050 | enable_supermuc=no]) |
1052 | AC_MSG_RESULT($enable_ll) | 1051 | AC_MSG_RESULT($enable_SUPERMUC) |
1053 | AM_CONDITIONAL([ENABLE_LL], [test "x$ll" = "x1"]) | 1052 | AM_CONDITIONAL([ENABLE_SUPERMUC], [test "x$supermuc" = "x1"]) |
1054 | AC_DEFINE_UNQUOTED([ENABLE_LL], [$ll], [Build with LL support]) | 1053 | AC_DEFINE_UNQUOTED([ENABLE_SUPERMUC], [$supermuc], [Build with support for SuperMUC]) |
1055 | 1054 | ||
1056 | # Check if NSE has to send timestamp information to testbed logger for | 1055 | # Check if NSE has to send timestamp information to testbed logger for |
1057 | # generating histogram of messages received | 1056 | # generating histogram of messages received |
diff --git a/src/arm/gnunet-service-arm.c b/src/arm/gnunet-service-arm.c index 1eaaa26c5..f5323c042 100644 --- a/src/arm/gnunet-service-arm.c +++ b/src/arm/gnunet-service-arm.c | |||
@@ -851,7 +851,7 @@ handle_stop (void *cls, struct GNUNET_SERVER_Client *client, | |||
851 | broadcast_status (servicename, GNUNET_ARM_SERVICE_STOPPING, NULL); | 851 | broadcast_status (servicename, GNUNET_ARM_SERVICE_STOPPING, NULL); |
852 | /* no signal_start - only when it's STOPPED */ | 852 | /* no signal_start - only when it's STOPPED */ |
853 | sl->killed_at = GNUNET_TIME_absolute_get (); | 853 | sl->killed_at = GNUNET_TIME_absolute_get (); |
854 | if (0 != GNUNET_OS_process_kill (sl->proc, SIGTERM)) | 854 | if (0 != GNUNET_OS_process_kill (sl->proc, GNUNET_TERM_SIG)) |
855 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); | 855 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); |
856 | sl->killing_client = client; | 856 | sl->killing_client = client; |
857 | sl->killing_client_request_id = request_id; | 857 | sl->killing_client_request_id = request_id; |
@@ -1013,7 +1013,7 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
1013 | "Stopping service `%s'\n", | 1013 | "Stopping service `%s'\n", |
1014 | pos->name); | 1014 | pos->name); |
1015 | pos->killed_at = GNUNET_TIME_absolute_get (); | 1015 | pos->killed_at = GNUNET_TIME_absolute_get (); |
1016 | if (0 != GNUNET_OS_process_kill (pos->proc, SIGTERM)) | 1016 | if (0 != GNUNET_OS_process_kill (pos->proc, GNUNET_TERM_SIG)) |
1017 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); | 1017 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); |
1018 | } | 1018 | } |
1019 | else | 1019 | else |
diff --git a/src/core/test_core_api.c b/src/core/test_core_api.c index 12745c984..af2b98e41 100644 --- a/src/core/test_core_api.c +++ b/src/core/test_core_api.c | |||
@@ -334,7 +334,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
334 | static void | 334 | static void |
335 | stop_arm (struct PeerContext *p) | 335 | stop_arm (struct PeerContext *p) |
336 | { | 336 | { |
337 | if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM)) | 337 | if (0 != GNUNET_OS_process_kill (p->arm_proc, GNUNET_TERM_SIG)) |
338 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); | 338 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); |
339 | if (GNUNET_OS_process_wait (p->arm_proc) != GNUNET_OK) | 339 | if (GNUNET_OS_process_wait (p->arm_proc) != GNUNET_OK) |
340 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid"); | 340 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid"); |
diff --git a/src/core/test_core_api_reliability.c b/src/core/test_core_api_reliability.c index ddc3c585e..97006fe95 100644 --- a/src/core/test_core_api_reliability.c +++ b/src/core/test_core_api_reliability.c | |||
@@ -447,7 +447,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
447 | static void | 447 | static void |
448 | stop_arm (struct PeerContext *p) | 448 | stop_arm (struct PeerContext *p) |
449 | { | 449 | { |
450 | if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM)) | 450 | if (0 != GNUNET_OS_process_kill (p->arm_proc, GNUNET_TERM_SIG)) |
451 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); | 451 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); |
452 | if (GNUNET_OS_process_wait (p->arm_proc) != GNUNET_OK) | 452 | if (GNUNET_OS_process_wait (p->arm_proc) != GNUNET_OK) |
453 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid"); | 453 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid"); |
diff --git a/src/core/test_core_api_start_only.c b/src/core/test_core_api_start_only.c index 0389a908e..255de0319 100644 --- a/src/core/test_core_api_start_only.c +++ b/src/core/test_core_api_start_only.c | |||
@@ -184,7 +184,7 @@ static void | |||
184 | stop_arm (struct PeerContext *p) | 184 | stop_arm (struct PeerContext *p) |
185 | { | 185 | { |
186 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping peer\n"); | 186 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping peer\n"); |
187 | if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM)) | 187 | if (0 != GNUNET_OS_process_kill (p->arm_proc, GNUNET_TERM_SIG)) |
188 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); | 188 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); |
189 | if (GNUNET_OS_process_wait (p->arm_proc) != GNUNET_OK) | 189 | if (GNUNET_OS_process_wait (p->arm_proc) != GNUNET_OK) |
190 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid"); | 190 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid"); |
diff --git a/src/core/test_core_quota_compliance.c b/src/core/test_core_quota_compliance.c index 7c1b198c9..71b842522 100644 --- a/src/core/test_core_quota_compliance.c +++ b/src/core/test_core_quota_compliance.c | |||
@@ -627,7 +627,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
627 | static void | 627 | static void |
628 | stop_arm (struct PeerContext *p) | 628 | stop_arm (struct PeerContext *p) |
629 | { | 629 | { |
630 | if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM)) | 630 | if (0 != GNUNET_OS_process_kill (p->arm_proc, GNUNET_TERM_SIG)) |
631 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); | 631 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); |
632 | if (GNUNET_OS_process_wait (p->arm_proc) != GNUNET_OK) | 632 | if (GNUNET_OS_process_wait (p->arm_proc) != GNUNET_OK) |
633 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid"); | 633 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid"); |
diff --git a/src/dns/gnunet-helper-dns.c b/src/dns/gnunet-helper-dns.c index 8ff6413f8..7764e7b4a 100644 --- a/src/dns/gnunet-helper-dns.c +++ b/src/dns/gnunet-helper-dns.c | |||
@@ -838,6 +838,9 @@ main (int argc, char *const*argv) | |||
838 | } | 838 | } |
839 | } | 839 | } |
840 | if ( (SIG_ERR == signal (SIGTERM, &signal_handler)) || | 840 | if ( (SIG_ERR == signal (SIGTERM, &signal_handler)) || |
841 | #if (SIGTERM != GNUNET_TERM_SIG) | ||
842 | (SIG_ERR == signal (GNUNET_TERM_SIG, &signal_handler)) || | ||
843 | #endif | ||
841 | (SIG_ERR == signal (SIGINT, &signal_handler)) || | 844 | (SIG_ERR == signal (SIGINT, &signal_handler)) || |
842 | (SIG_ERR == signal (SIGHUP, &signal_handler)) ) | 845 | (SIG_ERR == signal (SIGHUP, &signal_handler)) ) |
843 | { | 846 | { |
@@ -875,6 +878,9 @@ main (int argc, char *const*argv) | |||
875 | { | 878 | { |
876 | fprintf (stderr, "Fatal: could not initialize tun-interface\n"); | 879 | fprintf (stderr, "Fatal: could not initialize tun-interface\n"); |
877 | (void) signal (SIGTERM, SIG_IGN); | 880 | (void) signal (SIGTERM, SIG_IGN); |
881 | #if (SIGTERM != GNUNET_TERM_SIG) | ||
882 | (void) signal (GNUNET_TERM_SIG, SIG_IGN); | ||
883 | #endif | ||
878 | (void) signal (SIGINT, SIG_IGN); | 884 | (void) signal (SIGINT, SIG_IGN); |
879 | (void) signal (SIGHUP, SIG_IGN); | 885 | (void) signal (SIGHUP, SIG_IGN); |
880 | (void) close (cpipe[0]); | 886 | (void) close (cpipe[0]); |
@@ -891,6 +897,9 @@ main (int argc, char *const*argv) | |||
891 | { | 897 | { |
892 | fprintf (stderr, "Fatal: prefix_len out of range\n"); | 898 | fprintf (stderr, "Fatal: prefix_len out of range\n"); |
893 | (void) signal (SIGTERM, SIG_IGN); | 899 | (void) signal (SIGTERM, SIG_IGN); |
900 | #if (SIGTERM != GNUNET_TERM_SIG) | ||
901 | (void) signal (GNUNET_TERM_SIG, SIG_IGN); | ||
902 | #endif | ||
894 | (void) signal (SIGINT, SIG_IGN); | 903 | (void) signal (SIGINT, SIG_IGN); |
895 | (void) signal (SIGHUP, SIG_IGN); | 904 | (void) signal (SIGHUP, SIG_IGN); |
896 | (void) close (cpipe[0]); | 905 | (void) close (cpipe[0]); |
@@ -1043,6 +1052,9 @@ main (int argc, char *const*argv) | |||
1043 | (void) close (fd_tun); | 1052 | (void) close (fd_tun); |
1044 | /* remove signal handler so we can close the pipes */ | 1053 | /* remove signal handler so we can close the pipes */ |
1045 | (void) signal (SIGTERM, SIG_IGN); | 1054 | (void) signal (SIGTERM, SIG_IGN); |
1055 | #if (SIGTERM != GNUNET_TERM_SIG) | ||
1056 | (void) signal (GNUNET_TERM_SIG, SIG_IGN); | ||
1057 | #endif | ||
1046 | (void) signal (SIGINT, SIG_IGN); | 1058 | (void) signal (SIGINT, SIG_IGN); |
1047 | (void) signal (SIGHUP, SIG_IGN); | 1059 | (void) signal (SIGHUP, SIG_IGN); |
1048 | (void) close (cpipe[0]); | 1060 | (void) close (cpipe[0]); |
diff --git a/src/hostlist/test_gnunet_daemon_hostlist.c b/src/hostlist/test_gnunet_daemon_hostlist.c index 670c2ec28..2e1e5acb5 100644 --- a/src/hostlist/test_gnunet_daemon_hostlist.c +++ b/src/hostlist/test_gnunet_daemon_hostlist.c | |||
@@ -153,7 +153,7 @@ waitpid_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
153 | struct PeerContext *p = cls; | 153 | struct PeerContext *p = cls; |
154 | 154 | ||
155 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Killing ARM process.\n"); | 155 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Killing ARM process.\n"); |
156 | if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM)) | 156 | if (0 != GNUNET_OS_process_kill (p->arm_proc, GNUNET_TERM_SIG)) |
157 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); | 157 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); |
158 | if (GNUNET_OS_process_wait (p->arm_proc) != GNUNET_OK) | 158 | if (GNUNET_OS_process_wait (p->arm_proc) != GNUNET_OK) |
159 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid"); | 159 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid"); |
diff --git a/src/hostlist/test_gnunet_daemon_hostlist_learning.c b/src/hostlist/test_gnunet_daemon_hostlist_learning.c index 647b5983e..f581b532a 100644 --- a/src/hostlist/test_gnunet_daemon_hostlist_learning.c +++ b/src/hostlist/test_gnunet_daemon_hostlist_learning.c | |||
@@ -145,7 +145,7 @@ shutdown_testcase () | |||
145 | } | 145 | } |
146 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 146 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
147 | "Killing hostlist server ARM process.\n"); | 147 | "Killing hostlist server ARM process.\n"); |
148 | if (0 != GNUNET_OS_process_kill (adv_peer.arm_proc, SIGTERM)) | 148 | if (0 != GNUNET_OS_process_kill (adv_peer.arm_proc, GNUNET_TERM_SIG)) |
149 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); | 149 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); |
150 | if (GNUNET_OS_process_wait (adv_peer.arm_proc) != GNUNET_OK) | 150 | if (GNUNET_OS_process_wait (adv_peer.arm_proc) != GNUNET_OK) |
151 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid"); | 151 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid"); |
@@ -153,7 +153,7 @@ shutdown_testcase () | |||
153 | adv_peer.arm_proc = NULL; | 153 | adv_peer.arm_proc = NULL; |
154 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 154 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
155 | "Killing hostlist client ARM process.\n"); | 155 | "Killing hostlist client ARM process.\n"); |
156 | if (0 != GNUNET_OS_process_kill (learn_peer.arm_proc, SIGTERM)) | 156 | if (0 != GNUNET_OS_process_kill (learn_peer.arm_proc, GNUNET_TERM_SIG)) |
157 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); | 157 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); |
158 | if (GNUNET_OS_process_wait (learn_peer.arm_proc) != GNUNET_OK) | 158 | if (GNUNET_OS_process_wait (learn_peer.arm_proc) != GNUNET_OK) |
159 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid"); | 159 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid"); |
diff --git a/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c b/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c index 21b2973de..6b38ffe19 100644 --- a/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c +++ b/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c | |||
@@ -153,7 +153,7 @@ waitpid_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
153 | struct PeerContext *p = cls; | 153 | struct PeerContext *p = cls; |
154 | 154 | ||
155 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Killing ARM process.\n"); | 155 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Killing ARM process.\n"); |
156 | if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM)) | 156 | if (0 != GNUNET_OS_process_kill (p->arm_proc, GNUNET_TERM_SIG)) |
157 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); | 157 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); |
158 | if (GNUNET_OS_process_wait (p->arm_proc) != GNUNET_OK) | 158 | if (GNUNET_OS_process_wait (p->arm_proc) != GNUNET_OK) |
159 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid"); | 159 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid"); |
diff --git a/src/include/platform.h b/src/include/platform.h index e74427391..9d58427b9 100644 --- a/src/include/platform.h +++ b/src/include/platform.h | |||
@@ -266,4 +266,10 @@ atoll (const char *nptr); | |||
266 | #define SOCKTYPE int | 266 | #define SOCKTYPE int |
267 | #endif | 267 | #endif |
268 | 268 | ||
269 | #if ENABLE_SUPERMUC | ||
270 | #define GNUNET_TERM_SIG SIGUSR1 | ||
271 | #else | ||
272 | #define GNUNET_TERM_SIG SIGTERM | ||
273 | #endif | ||
274 | |||
269 | #endif | 275 | #endif |
diff --git a/src/nat/nat.c b/src/nat/nat.c index 03a77ddc3..6e55e3bc7 100644 --- a/src/nat/nat.c +++ b/src/nat/nat.c | |||
@@ -789,7 +789,7 @@ nat_server_read (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
789 | { | 789 | { |
790 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 790 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
791 | "Finished reading from server stdout with code: %d\n", bytes); | 791 | "Finished reading from server stdout with code: %d\n", bytes); |
792 | if (0 != GNUNET_OS_process_kill (h->server_proc, SIGTERM)) | 792 | if (0 != GNUNET_OS_process_kill (h->server_proc, GNUNET_TERM_SIG)) |
793 | GNUNET_log_from_strerror (GNUNET_ERROR_TYPE_WARNING, "nat", "kill"); | 793 | GNUNET_log_from_strerror (GNUNET_ERROR_TYPE_WARNING, "nat", "kill"); |
794 | GNUNET_OS_process_wait (h->server_proc); | 794 | GNUNET_OS_process_wait (h->server_proc); |
795 | GNUNET_OS_process_destroy (h->server_proc); | 795 | GNUNET_OS_process_destroy (h->server_proc); |
@@ -1303,7 +1303,7 @@ GNUNET_NAT_unregister (struct GNUNET_NAT_Handle *h) | |||
1303 | } | 1303 | } |
1304 | if (NULL != h->server_proc) | 1304 | if (NULL != h->server_proc) |
1305 | { | 1305 | { |
1306 | if (0 != GNUNET_OS_process_kill (h->server_proc, SIGTERM)) | 1306 | if (0 != GNUNET_OS_process_kill (h->server_proc, GNUNET_TERM_SIG)) |
1307 | GNUNET_log_from_strerror (GNUNET_ERROR_TYPE_WARNING, "nat", "kill"); | 1307 | GNUNET_log_from_strerror (GNUNET_ERROR_TYPE_WARNING, "nat", "kill"); |
1308 | GNUNET_OS_process_wait (h->server_proc); | 1308 | GNUNET_OS_process_wait (h->server_proc); |
1309 | GNUNET_OS_process_destroy (h->server_proc); | 1309 | GNUNET_OS_process_destroy (h->server_proc); |
diff --git a/src/nat/test_nat_test.c b/src/nat/test_nat_test.c index d017dffbd..752c8f145 100644 --- a/src/nat/test_nat_test.c +++ b/src/nat/test_nat_test.c | |||
@@ -107,7 +107,7 @@ main (int argc, char *const argv[]) | |||
107 | GNUNET_assert (NULL != gns); | 107 | GNUNET_assert (NULL != gns); |
108 | GNUNET_PROGRAM_run (3, argv_prog, "test-nat-test", "nohelp", options, &run, | 108 | GNUNET_PROGRAM_run (3, argv_prog, "test-nat-test", "nohelp", options, &run, |
109 | NULL); | 109 | NULL); |
110 | GNUNET_break (0 == GNUNET_OS_process_kill (gns, SIGTERM)); | 110 | GNUNET_break (0 == GNUNET_OS_process_kill (gns, GNUNET_TERM_SIG)); |
111 | GNUNET_break (GNUNET_OK == GNUNET_OS_process_wait (gns)); | 111 | GNUNET_break (GNUNET_OK == GNUNET_OS_process_wait (gns)); |
112 | GNUNET_OS_process_destroy (gns); | 112 | GNUNET_OS_process_destroy (gns); |
113 | if (0 != ret) | 113 | if (0 != ret) |
diff --git a/src/statistics/test_statistics_api.c b/src/statistics/test_statistics_api.c index 47871fa7b..aa9088f35 100644 --- a/src/statistics/test_statistics_api.c +++ b/src/statistics/test_statistics_api.c | |||
@@ -153,7 +153,7 @@ main (int argc, char *argv_ign[]) | |||
153 | GNUNET_assert (NULL != proc); | 153 | GNUNET_assert (NULL != proc); |
154 | GNUNET_PROGRAM_run (5, argv, "test-statistics-api", "nohelp", options, &run, | 154 | GNUNET_PROGRAM_run (5, argv, "test-statistics-api", "nohelp", options, &run, |
155 | &ok); | 155 | &ok); |
156 | if (0 != GNUNET_OS_process_kill (proc, SIGTERM)) | 156 | if (0 != GNUNET_OS_process_kill (proc, GNUNET_TERM_SIG)) |
157 | { | 157 | { |
158 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); | 158 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); |
159 | ok = 1; | 159 | ok = 1; |
@@ -175,7 +175,7 @@ main (int argc, char *argv_ign[]) | |||
175 | "-c", "test_statistics_api_data.conf", NULL); | 175 | "-c", "test_statistics_api_data.conf", NULL); |
176 | GNUNET_PROGRAM_run (5, argv, "test-statistics-api", "nohelp", options, | 176 | GNUNET_PROGRAM_run (5, argv, "test-statistics-api", "nohelp", options, |
177 | &run_more, &ok); | 177 | &run_more, &ok); |
178 | if (0 != GNUNET_OS_process_kill (proc, SIGTERM)) | 178 | if (0 != GNUNET_OS_process_kill (proc, GNUNET_TERM_SIG)) |
179 | { | 179 | { |
180 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); | 180 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); |
181 | ok = 1; | 181 | ok = 1; |
diff --git a/src/statistics/test_statistics_api_loop.c b/src/statistics/test_statistics_api_loop.c index 987b6c57b..7a7b44c1f 100644 --- a/src/statistics/test_statistics_api_loop.c +++ b/src/statistics/test_statistics_api_loop.c | |||
@@ -101,7 +101,7 @@ main (int argc, char *argv_ign[]) | |||
101 | GNUNET_assert (NULL != proc); | 101 | GNUNET_assert (NULL != proc); |
102 | GNUNET_PROGRAM_run (3, argv, "test-statistics-api", "nohelp", options, &run, | 102 | GNUNET_PROGRAM_run (3, argv, "test-statistics-api", "nohelp", options, &run, |
103 | &ok); | 103 | &ok); |
104 | if (0 != GNUNET_OS_process_kill (proc, SIGTERM)) | 104 | if (0 != GNUNET_OS_process_kill (proc, GNUNET_TERM_SIG)) |
105 | { | 105 | { |
106 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); | 106 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); |
107 | ok = 1; | 107 | ok = 1; |
diff --git a/src/statistics/test_statistics_api_watch.c b/src/statistics/test_statistics_api_watch.c index e75cab5f6..78bc425c5 100644 --- a/src/statistics/test_statistics_api_watch.c +++ b/src/statistics/test_statistics_api_watch.c | |||
@@ -130,7 +130,7 @@ main (int argc, char *argv_ign[]) | |||
130 | ok = 3; | 130 | ok = 3; |
131 | GNUNET_PROGRAM_run (3, argv, "test-statistics-api", "nohelp", options, &run, | 131 | GNUNET_PROGRAM_run (3, argv, "test-statistics-api", "nohelp", options, &run, |
132 | NULL); | 132 | NULL); |
133 | if (0 != GNUNET_OS_process_kill (proc, SIGTERM)) | 133 | if (0 != GNUNET_OS_process_kill (proc, GNUNET_TERM_SIG)) |
134 | { | 134 | { |
135 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); | 135 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); |
136 | ok = 1; | 136 | ok = 1; |
diff --git a/src/statistics/test_statistics_api_watch_zero_value.c b/src/statistics/test_statistics_api_watch_zero_value.c index d78de9a9e..c42c44428 100644 --- a/src/statistics/test_statistics_api_watch_zero_value.c +++ b/src/statistics/test_statistics_api_watch_zero_value.c | |||
@@ -166,7 +166,7 @@ main (int argc, char *argv_ign[]) | |||
166 | ok2 = 1; | 166 | ok2 = 1; |
167 | GNUNET_PROGRAM_run (3, argv, "test-statistics-api", "nohelp", options, &run, | 167 | GNUNET_PROGRAM_run (3, argv, "test-statistics-api", "nohelp", options, &run, |
168 | NULL); | 168 | NULL); |
169 | if (0 != GNUNET_OS_process_kill (proc, SIGTERM)) | 169 | if (0 != GNUNET_OS_process_kill (proc, GNUNET_TERM_SIG)) |
170 | { | 170 | { |
171 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); | 171 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); |
172 | ok = 1; | 172 | ok = 1; |
diff --git a/src/testbed/Makefile.am b/src/testbed/Makefile.am index f5d3647ae..57ea49a00 100644 --- a/src/testbed/Makefile.am +++ b/src/testbed/Makefile.am | |||
@@ -9,11 +9,6 @@ if USE_COVERAGE | |||
9 | XLIB = -lgcov | 9 | XLIB = -lgcov |
10 | endif | 10 | endif |
11 | 11 | ||
12 | if ENABLE_LL | ||
13 | ll_binaries = \ | ||
14 | gnunet-testbed-mpi-spawn | ||
15 | endif | ||
16 | |||
17 | libexecdir= $(pkglibdir)/libexec/ | 12 | libexecdir= $(pkglibdir)/libexec/ |
18 | 13 | ||
19 | pkgcfgdir= $(pkgdatadir)/config.d/ | 14 | pkgcfgdir= $(pkgdatadir)/config.d/ |
@@ -28,7 +23,6 @@ libexec_PROGRAMS = \ | |||
28 | gnunet-daemon-testbed-blacklist | 23 | gnunet-daemon-testbed-blacklist |
29 | 24 | ||
30 | bin_PROGRAMS = \ | 25 | bin_PROGRAMS = \ |
31 | $(ll_binaries) \ | ||
32 | gnunet-testbed-profiler | 26 | gnunet-testbed-profiler |
33 | 27 | ||
34 | gnunet_service_testbed_SOURCES = \ | 28 | gnunet_service_testbed_SOURCES = \ |
@@ -93,14 +87,6 @@ gnunet_daemon_testbed_blacklist_DEPENDENCIES = \ | |||
93 | $(top_builddir)/src/transport/libgnunettransport.la \ | 87 | $(top_builddir)/src/transport/libgnunettransport.la \ |
94 | $(top_builddir)/src/util/libgnunetutil.la | 88 | $(top_builddir)/src/util/libgnunetutil.la |
95 | 89 | ||
96 | gnunet_testbed_mpi_spawn_SOURCES = gnunet_testbed_mpi_spawn.c | ||
97 | gnunet_testbed_mpi_spawn_LDADD = $(XLIB) \ | ||
98 | $(top_builddir)/src/util/libgnunetutil.la \ | ||
99 | $(top_builddir)/src/testbed/libgnunettestbed.la | ||
100 | gnunet_testbed_mpi_spawn_DEPENDENCIES = \ | ||
101 | $(top_builddir)/src/util/libgnunetutil.la \ | ||
102 | libgnunettestbed.la | ||
103 | |||
104 | lib_LTLIBRARIES = \ | 90 | lib_LTLIBRARIES = \ |
105 | libgnunettestbed.la \ | 91 | libgnunettestbed.la \ |
106 | libgnunettestbedlogger.la | 92 | libgnunettestbedlogger.la |
diff --git a/src/testbed/gnunet-helper-testbed.c b/src/testbed/gnunet-helper-testbed.c index f89d8af8f..43040e146 100644 --- a/src/testbed/gnunet-helper-testbed.c +++ b/src/testbed/gnunet-helper-testbed.c | |||
@@ -166,7 +166,7 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
166 | if (NULL != testbed) | 166 | if (NULL != testbed) |
167 | { | 167 | { |
168 | LOG_DEBUG ("Killing testbed\n"); | 168 | LOG_DEBUG ("Killing testbed\n"); |
169 | GNUNET_break (0 == GNUNET_OS_process_kill (testbed, SIGTERM)); | 169 | GNUNET_break (0 == GNUNET_OS_process_kill (testbed, GNUNET_TERM_SIG)); |
170 | } | 170 | } |
171 | if (GNUNET_SCHEDULER_NO_TASK != read_task_id) | 171 | if (GNUNET_SCHEDULER_NO_TASK != read_task_id) |
172 | { | 172 | { |
@@ -298,7 +298,7 @@ child_death_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
298 | GNUNET_OS_process_destroy (testbed); | 298 | GNUNET_OS_process_destroy (testbed); |
299 | testbed = NULL; | 299 | testbed = NULL; |
300 | /* Send SIGTERM to our process group */ | 300 | /* Send SIGTERM to our process group */ |
301 | if (0 != PLIBC_KILL (0, SIGTERM)) | 301 | if (0 != PLIBC_KILL (0, GNUNET_TERM_SIG)) |
302 | { | 302 | { |
303 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "signal"); | 303 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "signal"); |
304 | shutdown_now (); /* Couldn't send the signal, we shutdown frowning */ | 304 | shutdown_now (); /* Couldn't send the signal, we shutdown frowning */ |
diff --git a/src/testbed/gnunet-testbed-profiler.c b/src/testbed/gnunet-testbed-profiler.c index c6c472f92..5e4678590 100644 --- a/src/testbed/gnunet-testbed-profiler.c +++ b/src/testbed/gnunet-testbed-profiler.c | |||
@@ -225,7 +225,7 @@ test_run (void *cls, | |||
225 | result = GNUNET_OK; | 225 | result = GNUNET_OK; |
226 | fprintf (stdout, "\n"); | 226 | fprintf (stdout, "\n"); |
227 | print_overlay_links_summary (); | 227 | print_overlay_links_summary (); |
228 | #if !ENABLE_LL | 228 | #if !ENABLE_SUPERMUC |
229 | fprintf (stdout, "Testbed running, waiting for keystroke to shut down\n"); | 229 | fprintf (stdout, "Testbed running, waiting for keystroke to shut down\n"); |
230 | fflush (stdout); | 230 | fflush (stdout); |
231 | (void) getc (stdin); | 231 | (void) getc (stdin); |
@@ -281,7 +281,7 @@ main (int argc, char *const *argv) | |||
281 | {'e', "num-errors", "COUNT", | 281 | {'e', "num-errors", "COUNT", |
282 | gettext_noop ("tolerate COUNT number of continious timeout failures"), | 282 | gettext_noop ("tolerate COUNT number of continious timeout failures"), |
283 | GNUNET_YES, &GNUNET_GETOPT_set_uint, &num_cont_fails}, | 283 | GNUNET_YES, &GNUNET_GETOPT_set_uint, &num_cont_fails}, |
284 | #if !ENABLE_LL | 284 | #if !ENABLE_SUPERMUC |
285 | {'H', "hosts", "FILENAME", | 285 | {'H', "hosts", "FILENAME", |
286 | gettext_noop ("name of the file with the login information for the testbed"), | 286 | gettext_noop ("name of the file with the login information for the testbed"), |
287 | GNUNET_YES, &GNUNET_GETOPT_set_string, &hosts_file}, | 287 | GNUNET_YES, &GNUNET_GETOPT_set_string, &hosts_file}, |
diff --git a/src/testbed/gnunet_testbed_mpi_spawn.c b/src/testbed/gnunet_testbed_mpi_spawn.c index a7652cfd8..d3a78d3d4 100644 --- a/src/testbed/gnunet_testbed_mpi_spawn.c +++ b/src/testbed/gnunet_testbed_mpi_spawn.c | |||
@@ -121,7 +121,7 @@ terminate_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
121 | } | 121 | } |
122 | } | 122 | } |
123 | hard_kill++; | 123 | hard_kill++; |
124 | GNUNET_break (0 == GNUNET_OS_process_kill (child, SIGTERM)); | 124 | GNUNET_break (0 == GNUNET_OS_process_kill (child, GNUNET_TERM_SIG)); |
125 | LOG (GNUNET_ERROR_TYPE_INFO, _("Waiting for child to exit.\n")); | 125 | LOG (GNUNET_ERROR_TYPE_INFO, _("Waiting for child to exit.\n")); |
126 | } | 126 | } |
127 | 127 | ||
diff --git a/src/testbed/testbed_api_hosts.c b/src/testbed/testbed_api_hosts.c index 51bd632c7..2b0d20127 100644 --- a/src/testbed/testbed_api_hosts.c +++ b/src/testbed/testbed_api_hosts.c | |||
@@ -565,7 +565,7 @@ GNUNET_TESTBED_hosts_load_from_loadleveler (const struct | |||
565 | GNUNET_CONFIGURATION_Handle *cfg, | 565 | GNUNET_CONFIGURATION_Handle *cfg, |
566 | struct GNUNET_TESTBED_Host ***hosts) | 566 | struct GNUNET_TESTBED_Host ***hosts) |
567 | { | 567 | { |
568 | #if !ENABLE_LL | 568 | #if !ENABLE_SUPERMUC |
569 | LOG (GNUNET_ERROR_TYPE_ERROR, | 569 | LOG (GNUNET_ERROR_TYPE_ERROR, |
570 | _("The function %s is only available when compiled with (--with-ll)\n"), | 570 | _("The function %s is only available when compiled with (--with-ll)\n"), |
571 | __func__); | 571 | __func__); |
@@ -1374,7 +1374,7 @@ GNUNET_TESTBED_is_host_habitable_cancel (struct | |||
1374 | *handle) | 1374 | *handle) |
1375 | { | 1375 | { |
1376 | GNUNET_SCHEDULER_cancel (handle->habitability_check_task); | 1376 | GNUNET_SCHEDULER_cancel (handle->habitability_check_task); |
1377 | (void) GNUNET_OS_process_kill (handle->auxp, SIGTERM); | 1377 | (void) GNUNET_OS_process_kill (handle->auxp, GNUNET_TERM_SIG); |
1378 | (void) GNUNET_OS_process_wait (handle->auxp); | 1378 | (void) GNUNET_OS_process_wait (handle->auxp); |
1379 | GNUNET_OS_process_destroy (handle->auxp); | 1379 | GNUNET_OS_process_destroy (handle->auxp); |
1380 | free_argv (handle->helper_argv); | 1380 | free_argv (handle->helper_argv); |
diff --git a/src/testbed/testbed_api_testbed.c b/src/testbed/testbed_api_testbed.c index 2d420c3e3..17f50bad6 100644 --- a/src/testbed/testbed_api_testbed.c +++ b/src/testbed/testbed_api_testbed.c | |||
@@ -1255,7 +1255,7 @@ GNUNET_TESTBED_run (const char *host_filename, | |||
1255 | GNUNET_assert (num_peers > 0); | 1255 | GNUNET_assert (num_peers > 0); |
1256 | rc = GNUNET_malloc (sizeof (struct GNUNET_TESTBED_RunHandle)); | 1256 | rc = GNUNET_malloc (sizeof (struct GNUNET_TESTBED_RunHandle)); |
1257 | rc->cfg = GNUNET_CONFIGURATION_dup (cfg); | 1257 | rc->cfg = GNUNET_CONFIGURATION_dup (cfg); |
1258 | #if ENABLE_LL | 1258 | #if ENABLE_SUPERMUC |
1259 | rc->num_hosts = GNUNET_TESTBED_hosts_load_from_loadleveler (rc->cfg, | 1259 | rc->num_hosts = GNUNET_TESTBED_hosts_load_from_loadleveler (rc->cfg, |
1260 | &rc->hosts); | 1260 | &rc->hosts); |
1261 | if (0 == rc->num_hosts) | 1261 | if (0 == rc->num_hosts) |
diff --git a/src/testing/testing.c b/src/testing/testing.c index cfca8ce9b..629089f87 100644 --- a/src/testing/testing.c +++ b/src/testing/testing.c | |||
@@ -508,7 +508,7 @@ static void | |||
508 | stop_shared_service_instance (struct SharedServiceInstance *i) | 508 | stop_shared_service_instance (struct SharedServiceInstance *i) |
509 | { | 509 | { |
510 | GNUNET_break (0 == i->n_refs); | 510 | GNUNET_break (0 == i->n_refs); |
511 | if (0 != GNUNET_OS_process_kill (i->proc, SIGTERM)) | 511 | if (0 != GNUNET_OS_process_kill (i->proc, GNUNET_TERM_SIG)) |
512 | LOG (GNUNET_ERROR_TYPE_WARNING, | 512 | LOG (GNUNET_ERROR_TYPE_WARNING, |
513 | "Killing shared service instance (%s) failed\n", i->ss->sname); | 513 | "Killing shared service instance (%s) failed\n", i->ss->sname); |
514 | (void) GNUNET_OS_process_wait (i->proc); | 514 | (void) GNUNET_OS_process_wait (i->proc); |
@@ -1418,7 +1418,7 @@ GNUNET_TESTING_peer_kill (struct GNUNET_TESTING_Peer *peer) | |||
1418 | GNUNET_break (0); | 1418 | GNUNET_break (0); |
1419 | return GNUNET_SYSERR; | 1419 | return GNUNET_SYSERR; |
1420 | } | 1420 | } |
1421 | if (0 != GNUNET_OS_process_kill (peer->main_process, SIGTERM)) | 1421 | if (0 != GNUNET_OS_process_kill (peer->main_process, GNUNET_TERM_SIG)) |
1422 | return GNUNET_SYSERR; | 1422 | return GNUNET_SYSERR; |
1423 | for (cnt = 0; cnt < peer->system->n_shared_services; cnt++) | 1423 | for (cnt = 0; cnt < peer->system->n_shared_services; cnt++) |
1424 | { | 1424 | { |
diff --git a/src/transport/gnunet-helper-transport-wlan-dummy.c b/src/transport/gnunet-helper-transport-wlan-dummy.c index d07b1f8f6..e6be00a73 100644 --- a/src/transport/gnunet-helper-transport-wlan-dummy.c +++ b/src/transport/gnunet-helper-transport-wlan-dummy.c | |||
@@ -314,7 +314,8 @@ main (int argc, char *argv[]) | |||
314 | 314 | ||
315 | signal (SIGINT, &sigfunc); | 315 | signal (SIGINT, &sigfunc); |
316 | signal (SIGTERM, &sigfunc); | 316 | signal (SIGTERM, &sigfunc); |
317 | 317 | signal (GNUNET_TERM_SIG, &sigfunc); | |
318 | |||
318 | write_std.size = 0; | 319 | write_std.size = 0; |
319 | write_std.pos = 0; | 320 | write_std.pos = 0; |
320 | write_pout.size = 0; | 321 | write_pout.size = 0; |
diff --git a/src/transport/gnunet-transport.c b/src/transport/gnunet-transport.c index ed47e29e1..0393a06cc 100644 --- a/src/transport/gnunet-transport.c +++ b/src/transport/gnunet-transport.c | |||
@@ -358,7 +358,7 @@ display_test_result (struct TestContext *tc, int result) | |||
358 | resolver_users--; | 358 | resolver_users--; |
359 | if ((0 == resolver_users) && (NULL != resolver)) | 359 | if ((0 == resolver_users) && (NULL != resolver)) |
360 | { | 360 | { |
361 | GNUNET_break (0 == GNUNET_OS_process_kill (resolver, SIGTERM)); | 361 | GNUNET_break (0 == GNUNET_OS_process_kill (resolver, GNUNET_TERM_SIG)); |
362 | GNUNET_OS_process_destroy (resolver); | 362 | GNUNET_OS_process_destroy (resolver); |
363 | resolver = NULL; | 363 | resolver = NULL; |
364 | } | 364 | } |
diff --git a/src/util/gnunet-uri.c b/src/util/gnunet-uri.c index 1964aade4..3465b5906 100644 --- a/src/util/gnunet-uri.c +++ b/src/util/gnunet-uri.c | |||
@@ -62,7 +62,7 @@ maint_child_death (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
62 | (0 == code) ) | 62 | (0 == code) ) |
63 | ret = 0; | 63 | ret = 0; |
64 | else | 64 | else |
65 | GNUNET_break (0 == GNUNET_OS_process_kill (p, SIGTERM)); | 65 | GNUNET_break (0 == GNUNET_OS_process_kill (p, GNUNET_TERM_SIG)); |
66 | GNUNET_OS_process_destroy (p); | 66 | GNUNET_OS_process_destroy (p); |
67 | } | 67 | } |
68 | 68 | ||
diff --git a/src/util/helper.c b/src/util/helper.c index 21f196ebc..404dad4fa 100644 --- a/src/util/helper.c +++ b/src/util/helper.c | |||
@@ -208,7 +208,7 @@ GNUNET_HELPER_kill (struct GNUNET_HELPER_Handle *h, | |||
208 | h->fh_to_helper = NULL; | 208 | h->fh_to_helper = NULL; |
209 | return ret; | 209 | return ret; |
210 | } | 210 | } |
211 | if (0 != GNUNET_OS_process_kill (h->helper_proc, SIGTERM)) | 211 | if (0 != GNUNET_OS_process_kill (h->helper_proc, GNUNET_TERM_SIG)) |
212 | return GNUNET_SYSERR; | 212 | return GNUNET_SYSERR; |
213 | return GNUNET_OK; | 213 | return GNUNET_OK; |
214 | } | 214 | } |
diff --git a/src/util/os_priority.c b/src/util/os_priority.c index d499ed985..1466ce059 100644 --- a/src/util/os_priority.c +++ b/src/util/os_priority.c | |||
@@ -229,6 +229,9 @@ GNUNET_OS_process_kill (struct GNUNET_OS_Process *proc, int sig) | |||
229 | case SIGINT: | 229 | case SIGINT: |
230 | case SIGKILL: | 230 | case SIGKILL: |
231 | case SIGTERM: | 231 | case SIGTERM: |
232 | #if (SIGTERM != GNUNET_TERM_SIG) | ||
233 | case GNUNET_TERM_SIG: | ||
234 | #endif | ||
232 | #if defined(WINDOWS) && !defined(__CYGWIN__) | 235 | #if defined(WINDOWS) && !defined(__CYGWIN__) |
233 | { | 236 | { |
234 | DWORD exitcode; | 237 | DWORD exitcode; |
diff --git a/src/util/scheduler.c b/src/util/scheduler.c index 8652ee297..36c3a443b 100644 --- a/src/util/scheduler.c +++ b/src/util/scheduler.c | |||
@@ -717,6 +717,9 @@ GNUNET_SCHEDULER_run (GNUNET_SCHEDULER_Task task, void *task_cls) | |||
717 | int ret; | 717 | int ret; |
718 | struct GNUNET_SIGNAL_Context *shc_int; | 718 | struct GNUNET_SIGNAL_Context *shc_int; |
719 | struct GNUNET_SIGNAL_Context *shc_term; | 719 | struct GNUNET_SIGNAL_Context *shc_term; |
720 | #if (SIGTERM != GNUNET_TERM_SIG) | ||
721 | struct GNUNET_SIGNAL_Context *shc_gterm; | ||
722 | #endif | ||
720 | 723 | ||
721 | #ifndef MINGW | 724 | #ifndef MINGW |
722 | struct GNUNET_SIGNAL_Context *shc_quit; | 725 | struct GNUNET_SIGNAL_Context *shc_quit; |
@@ -741,6 +744,9 @@ GNUNET_SCHEDULER_run (GNUNET_SCHEDULER_Task task, void *task_cls) | |||
741 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Registering signal handlers\n"); | 744 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Registering signal handlers\n"); |
742 | shc_int = GNUNET_SIGNAL_handler_install (SIGINT, &sighandler_shutdown); | 745 | shc_int = GNUNET_SIGNAL_handler_install (SIGINT, &sighandler_shutdown); |
743 | shc_term = GNUNET_SIGNAL_handler_install (SIGTERM, &sighandler_shutdown); | 746 | shc_term = GNUNET_SIGNAL_handler_install (SIGTERM, &sighandler_shutdown); |
747 | #if (SIGTERM != GNUNET_TERM_SIG) | ||
748 | shc_gterm = GNUNET_SIGNAL_handler_install (GNUNET_TERM_SIG, &sighandler_shutdown); | ||
749 | #endif | ||
744 | #ifndef MINGW | 750 | #ifndef MINGW |
745 | shc_pipe = GNUNET_SIGNAL_handler_install (SIGPIPE, &sighandler_pipe); | 751 | shc_pipe = GNUNET_SIGNAL_handler_install (SIGPIPE, &sighandler_pipe); |
746 | shc_quit = GNUNET_SIGNAL_handler_install (SIGQUIT, &sighandler_shutdown); | 752 | shc_quit = GNUNET_SIGNAL_handler_install (SIGQUIT, &sighandler_shutdown); |
@@ -820,6 +826,9 @@ GNUNET_SCHEDULER_run (GNUNET_SCHEDULER_Task task, void *task_cls) | |||
820 | } | 826 | } |
821 | GNUNET_SIGNAL_handler_uninstall (shc_int); | 827 | GNUNET_SIGNAL_handler_uninstall (shc_int); |
822 | GNUNET_SIGNAL_handler_uninstall (shc_term); | 828 | GNUNET_SIGNAL_handler_uninstall (shc_term); |
829 | #if (SIGTERM != GNUNET_TERM_SIG) | ||
830 | GNUNET_SIGNAL_handler_install (shc_gterm); | ||
831 | #endif | ||
823 | #ifndef MINGW | 832 | #ifndef MINGW |
824 | GNUNET_SIGNAL_handler_uninstall (shc_pipe); | 833 | GNUNET_SIGNAL_handler_uninstall (shc_pipe); |
825 | GNUNET_SIGNAL_handler_uninstall (shc_quit); | 834 | GNUNET_SIGNAL_handler_uninstall (shc_quit); |
diff --git a/src/util/test_common_logging_runtime_loglevels.c b/src/util/test_common_logging_runtime_loglevels.c index 7d8834082..14055e11f 100644 --- a/src/util/test_common_logging_runtime_loglevels.c +++ b/src/util/test_common_logging_runtime_loglevels.c | |||
@@ -64,7 +64,7 @@ end_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
64 | ok); | 64 | ok); |
65 | if (NULL != proc) | 65 | if (NULL != proc) |
66 | { | 66 | { |
67 | if (0 != GNUNET_OS_process_kill (proc, SIGTERM)) | 67 | if (0 != GNUNET_OS_process_kill (proc, GNUNET_TERM_SIG)) |
68 | { | 68 | { |
69 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); | 69 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); |
70 | } | 70 | } |
diff --git a/src/util/test_os_start_process.c b/src/util/test_os_start_process.c index 8e701750b..90d8ae101 100644 --- a/src/util/test_os_start_process.c +++ b/src/util/test_os_start_process.c | |||
@@ -60,7 +60,7 @@ struct read_context rc; | |||
60 | static void | 60 | static void |
61 | end_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 61 | end_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
62 | { | 62 | { |
63 | if (0 != GNUNET_OS_process_kill (proc, SIGTERM)) | 63 | if (0 != GNUNET_OS_process_kill (proc, GNUNET_TERM_SIG)) |
64 | { | 64 | { |
65 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); | 65 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); |
66 | } | 66 | } |
@@ -207,7 +207,7 @@ check_kill () | |||
207 | "gnunet-service-resolver", "-", NULL); | 207 | "gnunet-service-resolver", "-", NULL); |
208 | sleep (1); /* give process time to start, so we actually use the pipe-kill mechanism! */ | 208 | sleep (1); /* give process time to start, so we actually use the pipe-kill mechanism! */ |
209 | GNUNET_free (fn); | 209 | GNUNET_free (fn); |
210 | if (0 != GNUNET_OS_process_kill (proc, SIGTERM)) | 210 | if (0 != GNUNET_OS_process_kill (proc, GNUNET_TERM_SIG)) |
211 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); | 211 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); |
212 | GNUNET_assert (GNUNET_OK == GNUNET_OS_process_wait (proc)); | 212 | GNUNET_assert (GNUNET_OK == GNUNET_OS_process_wait (proc)); |
213 | GNUNET_OS_process_destroy (proc); | 213 | GNUNET_OS_process_destroy (proc); |
@@ -236,7 +236,7 @@ check_instant_kill () | |||
236 | proc = | 236 | proc = |
237 | GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_ERR, hello_pipe_stdin, hello_pipe_stdout, fn, | 237 | GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_ERR, hello_pipe_stdin, hello_pipe_stdout, fn, |
238 | "gnunet-service-resolver", "-", NULL); | 238 | "gnunet-service-resolver", "-", NULL); |
239 | if (0 != GNUNET_OS_process_kill (proc, SIGTERM)) | 239 | if (0 != GNUNET_OS_process_kill (proc, GNUNET_TERM_SIG)) |
240 | { | 240 | { |
241 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); | 241 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); |
242 | } | 242 | } |
diff --git a/src/util/test_resolver_api.c b/src/util/test_resolver_api.c index bcbaf4f04..220f4bdac 100644 --- a/src/util/test_resolver_api.c +++ b/src/util/test_resolver_api.c | |||
@@ -374,7 +374,7 @@ main (int argc, char *argv[]) | |||
374 | GNUNET_PROGRAM_run ((sizeof (argvx) / sizeof (char *)) - 1, | 374 | GNUNET_PROGRAM_run ((sizeof (argvx) / sizeof (char *)) - 1, |
375 | argvx, "test-resolver-api", "nohelp", | 375 | argvx, "test-resolver-api", "nohelp", |
376 | options, &run, &ok)); | 376 | options, &run, &ok)); |
377 | if (0 != GNUNET_OS_process_kill (proc, SIGTERM)) | 377 | if (0 != GNUNET_OS_process_kill (proc, GNUNET_TERM_SIG)) |
378 | { | 378 | { |
379 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); | 379 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); |
380 | ok = 1; | 380 | ok = 1; |
diff --git a/src/util/test_scheduler.c b/src/util/test_scheduler.c index 70ff95550..4cfd81c81 100644 --- a/src/util/test_scheduler.c +++ b/src/util/test_scheduler.c | |||
@@ -183,7 +183,7 @@ taskSig (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
183 | GNUNET_assert (1 == *ok); | 183 | GNUNET_assert (1 == *ok); |
184 | *ok = 8; | 184 | *ok = 8; |
185 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &taskLast, cls); | 185 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &taskLast, cls); |
186 | GNUNET_break (0 == PLIBC_KILL (getpid (), SIGTERM)); | 186 | GNUNET_break (0 == PLIBC_KILL (getpid (), GNUNET_TERM_SIG)); |
187 | } | 187 | } |
188 | 188 | ||
189 | 189 | ||