+sub WRITE {
+ use bytes qw(length);
+ syswrite($_[0]->{fh}, $_[1], $_[2] // length($_[1]), $_[3] // 0);
+}
+
+sub PRINT {
+ my $self = shift;
+ print { $self->{fh} } @_;
+}
+
+sub adjust_ret { # dwaitpid callback
+ my ($retref, $pid) = @_;
+ $$retref = '' if $?
+}
+