about summary refs log tree commit homepage
path: root/xt
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2023-11-02 09:35:33 +0000
committerEric Wong <e@80x24.org>2023-11-03 06:39:30 +0000
commitcfe25e6aa966144a9c96d1ba2c301fd5e1bad79b (patch)
tree4faa9092c422aafca9568e547634096da12667e9 /xt
parent16957ad7c4edcbf43294e67c8db06167594f0660 (diff)
downloadpublic-inbox-cfe25e6aa966144a9c96d1ba2c301fd5e1bad79b.tar.gz
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.
Diffstat (limited to 'xt')
-rwxr-xr-xxt/check-run.t2
1 files changed, 1 insertions, 1 deletions
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);