From cfe25e6aa966144a9c96d1ba2c301fd5e1bad79b Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 2 Nov 2023 09:35:33 +0000 Subject: replace ProcessIO with untied PublicInbox::IO This fixes two major problems with the use of tie for filehandles: * no way to do fcntl, stat, etc. calls directly on the tied handle, forcing callers to use the `tied' perlop to access the underlying IO::Handle * needing separate classes to handle blocking and non-blocking I/O As a result, Git->cleanup_if_unlinked, InputPipe->consume, and Qspawn->_yield_start have fewer bizzare bits and we can call `$io->blocking(0)' directly instead of `(tied *$io)->{fh}->blocking(0)' Having a PublicInbox::IO class will also allow us to support custom read buffering which allows inspecting the current state. --- xt/check-run.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xt') diff --git a/xt/check-run.t b/xt/check-run.t index cda839fe..d12b925d 100755 --- a/xt/check-run.t +++ b/xt/check-run.t @@ -14,7 +14,7 @@ use v5.12; use IO::Handle; # ->autoflush use PublicInbox::TestCommon; use PublicInbox::Spawn; -use PublicInbox::DS; # already loaded by Spawn via ProcessIO +use PublicInbox::DS; # already loaded by Spawn via PublicInbox::IO use Getopt::Long qw(:config gnu_getopt no_ignore_case auto_abbrev); use Errno qw(EINTR); use Fcntl qw(:seek); -- cgit v1.2.3-24-ge0c7