From 30ea29c4cac3e944d0b32fb9c5c9531077f867be Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 28 Dec 2015 17:14:28 +0100 Subject: m MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/satd-diminished.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/satd-diminished.c b/src/satd-diminished.c index 2c1308c..268aceb 100644 --- a/src/satd-diminished.c +++ b/src/satd-diminished.c @@ -87,7 +87,7 @@ main(int argc, char *argv[]) /* Pick-up where we left off. */ if (!fstat(CONN_FILENO, _attr)) { fd = CONN_FILENO; - goto fork_again; + goto peek_again; } else if (errno != EBADF) { goto fail; } @@ -110,11 +110,12 @@ accept_again: goto fail; close(fd), fd = CONN_FILENO; } -fork_again: +peek_again: if (recv(fd, &type, (size_t)1, MSG_PEEK /* Just peek in case we fail! */) <= 0) { perror(argv[0]); goto connection_done; } +fork_again: switch ((pid = fork())) { case -1: if (errno != EAGAIN) -- cgit v1.2.3-70-g09d2