Hide Forgot
+++ This bug was initially created as a clone of Bug #592910 +++ Description of problem: running 'guestfish --remote run' in a shell command substitution, i.e., `` or $() would cause the command to hang. Version-Release number of selected component (if applicable): guestfish 1.3.13 How reproducible: Always Steps to Reproduce: 1. $ eval `guestfish -a test.img --listen` 2. a=`guestfish --remote run` Actual results: we get hang with step 2 Expected results: the command should return on completion. Additional info: --- Additional comment from rjones on 2010-05-17 06:59:01 EDT --- Easy to reproduce. Something about guestfs_launch interferes with stdout in a way which is incompatible with the remote protocol. Note this *doesn't* happen with any other command. For example: $ a=`guestfish --remote list-devices` $ echo $a /dev/vda $ a=`guestfish --remote ping-daemon` $ echo $a --- Additional comment from rjones on 2010-05-17 07:01:11 EDT --- Created attachment 414520 [details] strace Output from: strace -o strace.log -f -s 1024 sh -c 'a=`guestfish --remote run`' --- Additional comment from jzheng on 2011-08-12 05:41:59 EDT --- Can this one get at least a documentation fix?
Documentation fix: http://git.annexia.org/?p=libguestfs.git;a=commitdiff;h=6cabc1cd02e181063596b48df55c3f6db51a6bb9
Documented in man page for guestfish: -- REMOTE CONTROL RUN COMMAND HANGING Using the "run" (or "launch") command remotely in a command substitution context hangs, ie. don’t do (note the backquotes): a=`guestfish --remote run` Since the "run" command produces no output on stdout, this is not useful anyway.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2011-1512.html