[Bugs-team] Odd thing about bug #745

cwjordanoi at cox.net cwjordanoi at cox.net
Thu Jul 28 12:10:43 UTC 2011


Thanks,

I should have said, I was running bash when I saw "cat /dev/stdin" echoing foo twice.  You make a good point about not using the shell-built in cat.  Far as I see, bash should be behaving like ksh does, and passing the signal on to the subshell.  Since this issue relates to bash, it should be assigned to "OI SFW" in the bug tracker?

Chris Jordan
cwjordanoi at cox.net

---- Julian Wiesener <jw at vtoc.de> wrote: 
> Hi,
> 
> to reproduce the problem you need to start a bash, because it's related
> to subshells in bash that do not exit. cat is also an built-in in ksh as
> well as bash, so you can expect an different behaviour on different
> shells. I can't tell why cat on ksh does echo foo twice on your system
> and also wasn't able to reproduce it. The reported problem is observable
> if you just try to read from stdin from an subshell and then Press
> Control+D to exit the subshell:
> 
> /usr/bin/cat <(/usr/bin/cat -) | /usr/bin/cat
> 
> Try ^D it on ksh, the subshell exits as expected, try it on bash, the
> subshell will not die. I used /usr/bin/cat for that examle, thus it's
> obvious that differences doesn't get introduced by different cat
> implementations.
> 
> 
> 
> Regards,
> Julian
> 




More information about the Bugs-team mailing list