commit 1479d2ce0628adb354480a8ae3238256b890d62f
parent 39f5ff83c63bcb4a61e49a9043d1daf202ad8240
Author: Christian Grothoff <christian@grothoff.org>
Date: Sun, 15 Mar 2015 17:14:11 +0100
minor beautifications
Diffstat:
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/mint/taler-mint-httpd_keystate.c b/src/mint/taler-mint-httpd_keystate.c
@@ -479,6 +479,7 @@ TALER_MINT_key_reload_loop (void)
{
struct sigaction act;
struct sigaction rec;
+ int ret;
if (0 != pipe (reload_pipe))
{
@@ -499,6 +500,7 @@ TALER_MINT_key_reload_loop (void)
return GNUNET_SYSERR;
}
+ ret = GNUNET_OK;
/* FIXME: allow for 'clean' termination or restart (#3474) */
while (1)
{
@@ -518,11 +520,14 @@ TALER_MINT_key_reload_loop (void)
read_again:
errno = 0;
- res = read (reload_pipe[0], &c, 1);
+ res = read (reload_pipe[0],
+ &c,
+ 1);
if ((res < 0) && (EINTR != errno))
{
GNUNET_break (0);
- return GNUNET_SYSERR;
+ ret = GNUNET_SYSERR;
+ break;
}
if (EINTR == errno)
goto read_again;
@@ -536,7 +541,7 @@ read_again:
"Failed to restore signal handler.\n");
return GNUNET_SYSERR;
}
- return GNUNET_OK;
+ return ret;
}