[Libguestfs] [PATCH 0/7] copy-in/copy-out: Capture errors from tar subprocess (RHBZ#1267032).

Pino Toscano ptoscano at redhat.com
Tue Sep 29 16:12:14 UTC 2015


On Tuesday 29 September 2015 12:54:47 Richard W.M. Jones wrote:
> Commits 3c27f3d91e1566854747bbe844186783fc84f3a8 and
> 1b6f0daa9ae7fcc94e389232d0c397816cda973d added an internal API for
> running commands asynchronously.  It is only used by the copy-in and
> copy-out APIs.
> 
> Unfortunately this made the command code very complex: it was almost
> impossible to redirect stderr to a file, and there were a lot of
> long-range dependencies through the file.  It was also buggy: it set
> up stderr of the child process pointing pipe, but never read from the
> pipe, so if the stderr output of the child process was sufficiently
> large then libguestfs would deadlock (possibly this can be triggered
> from a malicious filesystem too).
> 
> This patch series first reverts these commits, then adds a simpler way
> to run a child process without waiting (modelled on popen()), allows
> stderr errors to be captured, then reimplements copy-in/copy-out using
> these new internal APIs.
> 
> Note that the patch series breaks bisection, but I can't really think
> of a clearer way to reorganize it that would preserve bisection.

LGTM.

-- 
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20150929/b806d643/attachment.sig>


More information about the Libguestfs mailing list