russ, you're spot-on, as per usual. obvously, debugging when tired is a dangerous thing for me. i should have noticed the things you've pointed out right away. the second or third cut-and-paste of that command sequence usually does hang rc, which DEL fixes.
tomorrow, i will try to reproduce things. (it was quite reliable.) and see if i can get some more information. the return value of write /sys/src/cmd/seq,c:84 & 92 is not checked, but as you noted, that might not be the full story. - erik "Russ Cox" <[EMAIL PROTECTED]> writes | | > this command frequently hangs on my terminal | > for(i in `{seq 1 $n}){echo fu>/dev/null&} | | The back trace looks like rc is still trying to run seq | (it is in Xbackq, which is running the backquote expression) | and has not even gotten to the interesting part. | | I might believe that if you ran two in a row: | | for(i in `{seq 1 $n}){echo fu>/dev/null&} | for(i in `{seq 1 $n}){echo fu>/dev/null&} | | then that would make it hanging like that much more likely. | | But what it might have seen instead is a read returning -1 | because it was interrupted by a sys: child note. So seq might | not actually be done. That being said, there would still have to | be a bug in the kernel (or seq), since rc has closed the pipe end | that it is reading at that point, so seq shouldn't be blocked trying | to write to it. | | If you can reproduce the "hang", can you run ps and see if | the pid that rc is waiting for (it's in the argument to Waitfor | in the stack trace) is still running? If so, what's that guy doing, | and is it sed or is it rc? | | Russ