-implement suicide
This commit is contained in:
parent
644dbbf92b
commit
3a3d7f1ffb
@ -918,16 +918,14 @@ handle_mhd_request (void *cls,
|
|||||||
|
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
||||||
"Handling new request\n");
|
"Handling new request\n");
|
||||||
/* Atomic operation, no need for a lock ;-) */
|
cnt = req_count++;
|
||||||
cnt = __sync_add_and_fetch (&req_count,
|
|
||||||
1LLU);
|
|
||||||
if (req_max == cnt)
|
if (req_max == cnt)
|
||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
||||||
"Restarting exchange service after %llu requests\n",
|
"Restarting exchange service after %llu requests\n",
|
||||||
cnt);
|
cnt);
|
||||||
(void) kill (getpid (),
|
(void) kill (getpid (),
|
||||||
SIGHUP);
|
SIGTERM);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We're in a new async scope! */
|
/* We're in a new async scope! */
|
||||||
|
Loading…
Reference in New Issue
Block a user