aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-11-30 22:56:26 +0100
committerChristian Grothoff <christian@grothoff.org>2021-11-30 22:56:26 +0100
commit3a3d7f1ffbf89bf41a0304e6072817006f38ddc0 (patch)
treec2b8027bd43f155b028274108713ae7dcf3d7dfe
parent644dbbf92b88ca5567198391a6291c7b857fe9ab (diff)
-implement suicide
-rw-r--r--src/exchange/taler-exchange-httpd.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/exchange/taler-exchange-httpd.c b/src/exchange/taler-exchange-httpd.c
index 0a8798ae4..780c4658d 100644
--- a/src/exchange/taler-exchange-httpd.c
+++ b/src/exchange/taler-exchange-httpd.c
@@ -918,16 +918,14 @@ handle_mhd_request (void *cls,
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Handling new request\n");
- /* Atomic operation, no need for a lock ;-) */
- cnt = __sync_add_and_fetch (&req_count,
- 1LLU);
+ cnt = req_count++;
if (req_max == cnt)
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Restarting exchange service after %llu requests\n",
cnt);
(void) kill (getpid (),
- SIGHUP);
+ SIGTERM);
}
/* We're in a new async scope! */