Blame SOURCES/ksh-20120801-cdfork.patch

5a79ad
--- ksh-20120801/src/cmd/ksh93/sh/path.c	2014-09-01 15:08:06.738969962 -0300
5a79ad
+++ ksh-20120801/src/cmd/ksh93/sh/path.c	2014-09-01 15:13:51.321459978 -0300
5a79ad
@@ -229,13 +229,12 @@ static pid_t path_xargs(Shell_t *shp,con
5a79ad
 /*
5a79ad
  * make sure PWD is set up correctly
5a79ad
  * Return the present working directory
5a79ad
- * Invokes getcwd() if flag==0 and if necessary
5a79ad
+ * Invokes getcwd() if necessary
5a79ad
  * Sets the PWD variable to this value
5a79ad
  */
5a79ad
 char *path_pwd(Shell_t *shp,int flag)
5a79ad
 {
5a79ad
 	register char *cp;
5a79ad
-	register char *dfault = (char*)e_dot;
5a79ad
 	register int count = 0;
5a79ad
 	if(shp->pwd)
5a79ad
 		return((char*)shp->pwd);
5a79ad
@@ -254,11 +253,6 @@ char *path_pwd(Shell_t *shp,int flag)
5a79ad
 				cp = "/";
5a79ad
 				break;
5a79ad
 			case 3:
5a79ad
-				cp = (char*)e_crondir;
5a79ad
-				if(flag) /* skip next case when non-zero flag */
5a79ad
-					++count;
5a79ad
-				break;
5a79ad
-			case 4:
5a79ad
 			{
5a79ad
 				if(cp=getcwd(NIL(char*),0))
5a79ad
 				{  
cc131a
@@ -269,8 +263,8 @@ char *path_pwd(Shell_t *shp,int flag)
5a79ad
 				}
5a79ad
 				break;
5a79ad
 			}
5a79ad
-			case 5:
cc131a
+			case 4:
5a79ad
-				return(dfault);
cc131a
+				return((char*)e_dot);
5a79ad
 		}
5a79ad
 		if(cp && *cp=='/' && test_inode(cp,e_dot))
5a79ad
 			break;