Merge branch 'master' into 'master'

Correctly set O_NONBLOCK flag and disallow further reception using shutdown on...

See merge request sane-project/backends!803
merge-requests/569/head
Ralph Little 2023-10-09 23:37:48 +00:00
commit fd22c210cf
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -2256,8 +2256,8 @@ process_request (Wire * w)
strerror (errno));
return 1;
}
fcntl (data_fd, F_SETFL, 1); /* set non-blocking */
shutdown (data_fd, 0);
fcntl (data_fd, F_SETFL, O_NONBLOCK); /* set non-blocking */
shutdown (data_fd, SHUT_RD);
do_scan (w, h, data_fd);
close (data_fd);
}