if ($msg->{'type'} == $XMSG_DONE) {
Amanda::MainLoop::quit();
}
- });
+ }, 0, 0);
Amanda::MainLoop::run();
See L<http://wiki.zmanda.com/index.php/XFA> for background on the
=over
-=item start($cb)
+=item start($cb, $offset, $size)
-Start this transfer. Processing takes place asynchronously, and messages will
+Start this transfer. It transfer $size bytes starting from offset $offset.
+$offset must be 0. $size is only supported by Amanda::Xfer::Source::Recovery.
+A size of 0 transfer everything to EOF.
+Processing takes place asynchronously, and messages will
begin queueing up immediately. If C<$cb> is given, then it is installed as the
callback for messages from this transfer. The callback receives three
arguments: the event source, the message, and a reference to the controlling
=head3 Amanda::Xfer::Filter:Process
- Amanda::Xfer::Filter::Process->new([@args], $need_root, $log_stderr);
+ $xfp = Amanda::Xfer::Filter::Process->new([@args], $need_root);
This filter will pipe data through the standard file descriptors of the
subprocess specified by C<@args>. If C<$need_root> is true, it will attempt to
-change to uid 0 before executing the process. Standard output from the process
-is redirected to the debug log. Note that the process is invoked directly, not
-via a shell, so shell metacharcters (e.g., C<< 2>&1 >>) will not function as
-expected. If C<$log_stderr> is set, then the filter's standard error is sent
-to the debug log; otherwise, it is sent to the parent process's stderr.
+change to uid 0 before executing the process. Note that the process is
+invoked directly, not via a shell, so shell metacharcters (e.g., C<< 2>&1 >>)
+will not function as expected. This method create a pipe for the process
+stderr and the caller must read it or a hang may occur.
+
+ $xfp->get_stderr_fd()
+
+Return the file descriptor of the stderr pipe to read from.
=head3 Amanda::Xfer::Filter:Xor