I sent that patch only to David and Olga during off-list communication,
I did not sent it to ast list. I attached it this time.
I was not able to debug the problem nor found reproducer. I just found
out that reverting one change fixes the problem and does not cause any
regression in tests.
The patch is in fact simple revert of sh_open->open change in path.c
On 8.7.2013 17:36, Roland Mainz wrote:
On Mon, Jul 8, 2013 at 5:21 PM, Michal Hlavinka <[email protected]> wrote:
[snip]
For example, the one reported in
[ast-developers] ksh 2013-02-14+ can't build itself
is still valid. I still need to use extra patch for ksh 2013-02-14+ to be
able to build itself.
Erm... which patch was that again ? I remember that issue and that it
was hard to follow because "valgrind" instrumentation doesn't work and
"strace" failed too... and the issue doesn't show-up on Solaris where
I have more&&better tracing&&instrumentation facilities... and the
issue was damn sporadic (which drives me nuts) ...
----
Bye,
Roland
diff -up ksh-20130524/src/cmd/ksh93/sh/path.c.extrapatch1 ksh-20130524/src/cmd/ksh93/sh/path.c
--- ksh-20130524/src/cmd/ksh93/sh/path.c.extrapatch1 2013-04-25 16:32:47.000000000 +0200
+++ ksh-20130524/src/cmd/ksh93/sh/path.c 2013-05-27 16:59:36.957379976 +0200
@@ -46,6 +46,7 @@
# define vfork() fork()
# endif
#endif
+#undef open
#define RW_ALL (S_IRUSR|S_IRGRP|S_IROTH|S_IWUSR|S_IWGRP|S_IWOTH)
#define LIBCMD "cmd"
@@ -952,7 +953,7 @@ static int canexecute(Shell_t *shp,regis
path = path_relative(shp,path);
if(isfun)
{
- if((fd=open(path,O_RDONLY|O_cloexec,0))<0 || fstat(fd,&statb)<0)
+ if((fd=sh_open(path,O_RDONLY|O_cloexec,0))<0 || fstat(fd,&statb)<0)
goto err;
}
else if(stat(path,&statb) < 0)
@@ -1352,7 +1353,7 @@ static void exscript(Shell_t *shp,regist
char *savet=0;
struct stat statb;
int err=0;
- if((n=open(path,O_RDONLY|O_cloexec,0)) >= 0)
+ if((n=sh_open(path,O_RDONLY|O_cloexec,0)) >= 0)
{
/* move <n> if n=0,1,2 */
n = sh_iomovefd(shp,n);
_______________________________________________
ast-users mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-users