[ovirt-devel] execCmd() and storing stdout and stderr in log file

Richard W.M. Jones rjones at redhat.com
Thu Jul 14 13:03:20 UTC 2016


On Thu, Jul 14, 2016 at 02:40:06PM +0200, Tomáš Golembiovský wrote:
> This is something I have tried as first, as you can see here:
> 
> https://gerrit.ovirt.org/#/c/59834/4/lib/vdsm/v2v.py@404
> 
> The problem with this approach is that we don't get proper exit code from virt-v2v
> because of the pipe. Fixing this in POSIX shell is not trivial and would lead
> to more complex shell code here. (Would be fairly easy to fix if we could
> resort to using bash here.)

Script mentioned previously also solves the exit code problem.
However you do need to use a shell for it (or perhaps reimplement that
wrapper script in a tiny bit of Python?).

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW



More information about the Devel mailing list