[CRIU] [PATCH 3/5] service: exit if accept() returned an error
Andrew Vagin
avagin at parallels.com
Fri Sep 20 15:20:39 EDT 2013
On Fri, Sep 20, 2013 at 11:17:23PM +0400, Ruslan Kuprieiev wrote:
> On 09/19/2013 02:37 PM, Andrey Vagin wrote:
> >I don't know a reason, when accept() fails once and then goes back to
> >normal work.
> >
> >Cc: Ruslan Kuprieiev <kupruser at gmail.com>
> >Signed-off-by: Andrey Vagin <avagin at openvz.org>
> >---
> > cr-service.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> >diff --git a/cr-service.c b/cr-service.c
> >index c385549..ee0f849 100644
> >--- a/cr-service.c
> >+++ b/cr-service.c
> >@@ -273,7 +273,7 @@ int cr_service(bool daemon_mode)
> > &client_addr_len);
> > if (cr_service_client->sk_fd == -1) {
> > pr_perror("Can't accept connection.");
> >- continue;
> >+ goto err;
> > }
> > pr_info("Connected.\n");
> Why not "continue"?
> I thought, server must continue work and try to accept next connection.
> >I don't know a reason, when accept() fails once and then goes back to
> >normal work.
It can continue to return errors, and the log file fills all disk space.
Do we want that?
More information about the CRIU
mailing list