Bug 760669 - guestfish copy-in and <! (inline execution) don't mix well: pclose: No child processes
guestfish copy-in and <! (inline execution) don't mix well: pclose: No child ...
Status: CLOSED UPSTREAM
Product: Virtualization Tools
Classification: Community
Component: libguestfs (Show other bugs)
unspecified
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Richard W.M. Jones
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-06 13:39 EST by Richard W.M. Jones
Modified: 2011-12-07 07:13 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-12-07 07:13:23 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Richard W.M. Jones 2011-12-06 13:39:24 EST
Description of problem:

From a directory full of files, try this:

$ guestfish -N fs:ext2:10G -m /dev/sda1 

Welcome to guestfish, the libguestfs filesystem interactive shell for
editing virtual machine filesystems.

Type: 'help' for help on commands
      'man' to read the manual
      'quit' to quit the shell

><fs> <! for f in *; do echo copy-in "$f" /; done
pclose: No child processes

The error appears to be because the guestfish copy-in command
starts a tar subprocess.  It then calls wait(2).  It seems this
wait(2) is reaping the wrong process (the <! shell).  Really
it should call waitpid/wait4 instead to wait for the specific
process that it starts.

Version-Release number of selected component (if applicable):

1.15.9

Additional info:
Comment 1 Richard W.M. Jones 2011-12-07 07:13:23 EST
Fixed in commit 98edfac1ee70bcf15ee7caebc306e11cdbbb0d9a.

Note You need to log in before you can comment on or make changes to this bug.