File ksh93-subshellpwd.dif of Package ksh

--- ./src/cmd/ksh93/sh/subshell.c.orig	2014-11-13 15:56:44.331110277 +0000
+++ ./src/cmd/ksh93/sh/subshell.c	2014-11-13 15:58:05.104764274 +0000
@@ -547,7 +547,7 @@ Sfio_t *sh_subshell(Shell_t *shp,Shnode_
 		struct subshell *xp;
 		sp->shpwd = shp->pwd;
 #ifdef _lib_fchdir
-		for(xp=sp->prev; xp; xp=xp->prev) 
+		for(xp=sp->prev; shp->pwd && xp; xp=xp->prev) 
 		{
 			if(xp->pwdfd>0 && strcmp(xp->pwd,shp->pwd)==0)
 			{
openSUSE Build Service is sponsored by