]> git.ipfire.org Git - thirdparty/coreutils.git/commit
maint: refactor tail.c to use iopoll
authorPádraig Brady <P@draigBrady.com>
Tue, 28 Feb 2023 18:36:02 +0000 (18:36 +0000)
committerPádraig Brady <P@draigBrady.com>
Wed, 1 Mar 2023 19:27:36 +0000 (19:27 +0000)
commit76b5843ff99977107580cd581213ea2b5b3a81a7
tree6a609b39fd0ada8899892e40dbea7befbb2ffd9e
parent5bcc2912e7d7c16d3052a7ed4f0904f72573255e
maint: refactor tail.c to use iopoll

* src/tail.c (check_output_alive): Reuse iopoll()
rather than directly calling poll() or select().
* src/iopoll.c (iopoll): Refactor to support non blocking operation,
or ignoring descriptors by passing a negative value.
* src/iopoll.h (iopoll): Adjust to support a BLOCK parameter.
* src/tee.c (tee_files): Adjust iopoll() call to explicitly block.
* src/local.mk: Have tail depend on iopoll.c.
src/iopoll.c
src/iopoll.h
src/local.mk
src/tail.c
src/tee.c