On Sun, Nov 8, 2009 at 10:14 AM, Chet Ramey <chet.ra...@case.edu> wrote:
> I think you're confused about the distinction. set -m and +m turn job > control on and off. The `monitor' name is historical (ask Dave Korn > why he chose it). > That's what confused the whole issue. > What version of bash are you using? 4.0.35(12)-release Assuming you mean an interactive shell, bash-4.0 behaves like I think you > want: > > $ sleep 40 & > [1] 19038 > $ set +m > $ kill %1 > $ fg %1 > bash: fg: no job control > $ set -m > $ sleep 40 & > [1] 19041 > $ kill %1 > $ > [1]+ Terminated sleep 40 > $ > That's exactly what I wanted. Thanks for the detailed sample! Sorry for the confusion. Please ignore the patch. Bash as it is. Jeff