gosh: Create a new process group for each child

Create a new process group for each child process. This allows us to
send signals to the child process and any other processes in the same
process group, which typically includes the other processes started by
child process.

Use the process group to clean up after the child process exits.

MultiPart: 1/2

Change-Id: Iad3daab102a29144d36d5d1f0e153b7df233f459
3 files changed