mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
lvmetad: Suppress accept error on clean shutdown
Also fix error message after pthread_create() error in handle_connect().
This commit is contained in:
parent
70c340dbc2
commit
fdd00ecdd1
@ -1,5 +1,6 @@
|
||||
Version 2.02.173 -
|
||||
=================================
|
||||
Suppress error message from accept() on clean lvmetad shutdown.
|
||||
Tidy clvmd client list processing and fix segfaults.
|
||||
Protect clvmd debug log messages with mutex and add client id.
|
||||
Fix shellcheck reported issues for script files.
|
||||
|
@ -491,7 +491,8 @@ static int handle_connect(daemon_state s)
|
||||
|
||||
client.socket_fd = accept(s.socket_fd, (struct sockaddr *) &sockaddr, &sl);
|
||||
if (client.socket_fd < 0) {
|
||||
ERROR(&s, "Failed to accept connection errno %d.", errno);
|
||||
if (errno != EAGAIN || !_shutdown_requested)
|
||||
ERROR(&s, "Failed to accept connection: %s.", strerror(errno));
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -512,8 +513,8 @@ static int handle_connect(daemon_state s)
|
||||
ts->s = s;
|
||||
ts->client = client;
|
||||
|
||||
if (pthread_create(&ts->client.thread_id, NULL, _client_thread, ts)) {
|
||||
ERROR(&s, "Failed to create client thread errno %d.", errno);
|
||||
if ((errno = pthread_create(&ts->client.thread_id, NULL, _client_thread, ts))) {
|
||||
ERROR(&s, "Failed to create client thread: %s.", strerror(errno));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user