diff -up ksh-20100701/src/cmd/ksh93/sh/xec.c.pipeio ksh-20100701/src/cmd/ksh93/sh/xec.c --- ksh-20100701/src/cmd/ksh93/sh/xec.c.pipeio 2010-06-30 22:16:08.000000000 +0200 +++ ksh-20100701/src/cmd/ksh93/sh/xec.c 2010-07-21 09:25:54.122741030 +0200 @@ -1320,7 +1320,10 @@ int sh_exec(register const Shnode_t *t, ((Shnode_t*)t)->com.comset = 0; #endif if(shp->exitval >=0) + { + sfsync(sfstdout); goto setexit; + } np = 0; type=0; }