Bug 760669 - guestfish copy-in and <! (inline execution) don't mix well: pclose: No child processes
Summary: guestfish copy-in and <! (inline execution) don't mix well: pclose: No child ...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-06 18:39 UTC by Richard W.M. Jones
Modified: 2011-12-07 12:13 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-07 12:13:23 UTC
Embargoed:


Attachments (Terms of Use)

Description Richard W.M. Jones 2011-12-06 18:39:24 UTC
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 12:13:23 UTC
Fixed in commit 98edfac1ee70bcf15ee7caebc306e11cdbbb0d9a.


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