On Wed, 3 Apr 2019 13:11:07 +0000 Slavomir Kaslev <kaslevs@xxxxxxxxxx> wrote: > > > > Why the polling code, and not just block on splice? > > To work around older kernels that don't have the splice(2) > O_NONBLOCKING fix[1] for pipes. > > An alternative would be to configure SIGINT not to auto restart > syscalls (which is the default afaik). Then splice(2) will return > EAGAIN and will can restart it with SPLICE_F_NONBLOCK flag on. There needs to be a comment explaining its existence then, and perhaps we can do a check at the beginning (someplace else) to see if the fix is in, and then skip this part if it is. -- Steve