following change is causing this regression:

--- ksh20100621/src/cmd/ksh93/sh/io.c   2010-06-10 21:09:46.000000000 +0200
+++ ksh20100701/src/cmd/ksh93/sh/io.c   2010-06-25 02:09:55.000000000 +0200
@@ -1070,7 +1175,7 @@ int     sh_redirect(Shell_t *shp,struct iono
      message = e_file;
      goto fail;
   }
-  if(shp->subshell && dupfd==1 && (sfset(sfstdout,0,0)&SF_STRING))
+  if(shp->subshell && dupfd==1)
   {
       if(sfset(sfstdout,0,0)&SF_STRING)
           sh_subtmpfile(shp);

On 11/24/2011 03:51 PM, Michal Hlavinka wrote:
Hi,

after updating our ksh packages, we've found a regression. Last working
version is 2010-06-21. 2010-07-01 and newer versions reproduce this
regression. ksh just stops execution without any error, crash or
anything. Exit code is zero.

Reproducer:
#!/bin/ksh
function fun1
{
/bin/true
cd - >/dev/null 2>&1
print -u2 -- "$(/bin/date) SUCCESS"
}

echo $(fun1 )


2010-06-21 (and older) prints SUCCESS, 2010-07-21 prints nothing. Adding
set -x shows that /bin/date is last command executed.

Michal


_______________________________________________
ast-developers mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-developers

Reply via email to