copy: hide in copy_bytes() the strange way splice() handles O_NONBLOCK
authorLennart Poettering <lennart@poettering.net>
Fri, 23 Mar 2018 16:44:15 +0000 (17:44 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 13 Apr 2018 09:32:46 +0000 (11:32 +0200)
commite0c5c7d8fa07f44c2b694c809703cb8a59f0dfed
treeaa772b39dc987f9c054d6e4d99efb5c318119ebc
parent7a23c7fdfe82754bebecf82cdb7e1ecb44d6f23f
copy: hide in copy_bytes() the strange way splice() handles O_NONBLOCK

splice() ignores O_NONBLOCK on pipes but not on other fds. Let's handle
that properly, and query O_ONBLOCK manually in that case, ensuring
systematic behaviour in either case.
src/basic/copy.c