6sigma@polari.UUCP (Brian Matthews) (09/28/89)
After my recent posting on problems with System V and bash, I got some patches from Robert Andersson (and copies of these patches from a couple of other people, thanx everybody). I applied them, and things basically worked. Since then, I've made some changes (which I'll post when they work), and encountered some problems. The changes I've made include adding the job list stuff to the System V bash, so I obviously can't try it without my patches. I'd appreciate it if someone (Brian?) can try these examples, and see if they work on a vanilla 1.03 bash on BSD (I don't have a BSD to machine, so I can't try them myself). I'm using bash 1.03 as a base. Thanx much. 1. for i in 1 2;do sleep 10&done When I run this, bash prints the job numbers and pids and then displays logout and exits, like I'd typed a ^D. If I use for i in 1;... it works fine. 2. for i in a b c d e f g h i j k l m n o p q r s t;do sleep 10&done This prints the job number and pid for the first 15 or so sleeps, and then reports redirection error: Too many open files. With a cursory look at execute_cmd.c, it looks like everything is getting closed properly, but obviously it's not. 3. sleep 1000&kill -1 %1 This kills the sleep (as shown by ps), but the job remains in the job list. I've put printfs in flush_child, but it never gets there, so the SIG_CHLD is getting lost. Unfortunately, it only happens with signal 1. A kill -2 %1 removes the job from the list and displays an appropriate notification. It might have something to do with the signal calls in make_child, but I can't get it to work. Doing the same thing under ksh works, so it is possible. 4. current_job and previous_job don't seem to be maintained correctly. For instance, sleep 1000 & sleep 1000 & sleep 1000 & jobs -l displays the last sleep as the current job, but no previous job. If I then kill the last sleep and do a jobs -l, there is no previous or current job. This looks like it has to do with reset_current, but I'm not sure. Again, thanx for your help. -- Brian L. Matthews blm@6sigma.UUCP Six Sigma CASE, Inc. +1 206 854 6578 PO Box 40316, Bellevue, WA 98004