On 4/14/11 11:41 AM, Paolo Herms wrote: > Bash Version: 4.2 > Patch Level: 8 > Release Status: release > > Description: > In a bash script I have to switch on job control using set -m, as it seems to > be the only way to trap a SIGCHLD as soon as a background process terminates. > The documentation says that 'Background processes run in a separate process > group [...]' and this is good. Now it looks like switching on this monitor > mode leads also foreground processes to run in a seperate process group. This > is a bug, because specification suggests the contrary, and a problem, because > the foreground process should receive signals sent to the script's process > group.
Sorry the documentation is unclear. All jobs run in separate process groups when job control/monitor mode is enabled. Background processes get a line describing their exit status when they complete. The section on job control explains this in somewhat more detail. When job control is enabled, foreground jobs should not receive signals sent to the shell's process group. That is one of the reasons to enable job control. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/