On Mon, Apr 05, 2010 at 02:03:07PM -0400, Glenn Fowler wrote:
> 
> what in the example code prints "bang"?
> 
> On Mon, 29 Mar 2010 11:08:37 +0200 Dr. Werner Fink wrote:
> > I've just become owner of a bug report reporting a flaky behaviour
> > in handling traps on SIGCHLD.  For a simply test see
> 
> >  ksh> echo ${sh.version}
> >  Version JM 93t+ 2010-02-14
> >  ksh> trap "" CHLD
> >  let n=0; for d in $(seq 1 200); do if echo foo | grep bar; then echo oops 
> > $((n++)); fi; done
> >  bang 0
> >  [...]
> >  bang 177
> >  ksh>

Cut&past error, one XTerm with the above example code line and
an other with a simliar example code line but different echo
for the result.  Now with one XTerm:

 wer...@boole:/usr/src/werner/ksh> trap "" CHLD
 wer...@boole:/usr/src/werner/ksh> let n=0; for d in $(seq 1 200); do if echo 
foo | grep bar; then echo oops $((n++)); fi; done
 oops 0
 oops 1
 [...]
 oops 141
 oops 142
 oops 143
 wer...@boole:/usr/src/werner/ksh> 

... The reported version of the ksh is latest 2010-03-09 nevertheless I see
this also with the local 2010-02-14.

         Werner

-- 
  "Having a smoking section in a restaurant is like having
          a peeing section in a swimming pool." -- Edward Burr
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users

Reply via email to