diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2011-05-05 19:17:09 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2011-05-05 19:17:09 +0200 |
commit | 1547687a83334b056fdf06ed0c5676e948eafb30 (patch) | |
tree | bf1dcd23b5a7d7a8728568355ea72673670d3c3e /libudev | |
parent | 67a77c8bf299f6264f001677becd056316ebce2f (diff) |
libudev: ctrl - log accept4() errors
Diffstat (limited to 'libudev')
-rw-r--r-- | libudev/libudev-ctrl.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libudev/libudev-ctrl.c b/libudev/libudev-ctrl.c index a2133fff1c..61e0243383 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; } |