Imported Upstream version 3.3.0
[debian/amanda] / perl / Amanda / Xfer.pod
index d09923c7e5c291e32fd16ec0ef95728202072448..f449b517cf4f3bc819067e1fb457e2d091f76a0b 100644 (file)
@@ -42,7 +42,7 @@ Amanda::Xfer - the transfer architecture
       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
@@ -58,9 +58,12 @@ The resulting object has the following methods:
 
 =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
@@ -228,15 +231,18 @@ C<$addrs> and reads the transfer data from the connection.
 
 =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