From: Kay Sievers Date: Thu, 5 May 2011 17:17:09 +0000 (+0200) Subject: libudev: ctrl - log accept4() errors X-Git-Tag: 174~151 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1547687a83334b056fdf06ed0c5676e948eafb30;p=systemd libudev: ctrl - log accept4() errors --- diff --git a/libudev/libudev-ctrl.c b/libudev/libudev-ctrl.c index a2133fff..61e02433 100644 --- a/libudev/libudev-ctrl.c +++ b/libudev/libudev-ctrl.c @@ -184,8 +184,10 @@ struct udev_ctrl_connection *udev_ctrl_get_connection(struct udev_ctrl *uctrl) conn->refcount = 1; conn->uctrl = uctrl; - conn->sock = accept4(uctrl->sock, NULL, NULL, SOCK_CLOEXEC); + conn->sock = accept4(uctrl->sock, NULL, NULL, SOCK_CLOEXEC|SOCK_NONBLOCK); if (conn->sock < 0) { + if (errno != EINTR) + err(uctrl->udev, "unable to receive ctrl connection: %m\n"); free(conn); return NULL; }