Mail Archives: djgpp-workers/1996/10/01/03:55:16
I got a report from a user of the alpha Make port which seems to indicate
that some script interpreters might not look for the script along the
$PATH. Even if that is not so, I think passing the exact pathname of the
script is a Good Thing since it eliminates the need to search the PATH.
So here is the patch:
*** src/libc/dos/process/dosexec.c~2 Sun Sep 15 11:53:34 1996
--- src/libc/dos/process/dosexec.c Mon Sep 30 11:26:18 1996
*************** static int script_exec(const char *progr
*** 895,901 ****
for (i=0; argv[i]; i++)
newargs[i+1+hasargs] = unconst(argv[i], char *);
newargs[i+1+hasargs] = 0;
! newargs[0] = unconst(argv[0], char *);
if (hasargs)
newargs[1] = iargs;
--- 895,903 ----
for (i=0; argv[i]; i++)
newargs[i+1+hasargs] = unconst(argv[i], char *);
newargs[i+1+hasargs] = 0;
! /* Some interpreters might have their own ideas about $PATH.
! Therefore, pass them the full pathname of the script. */
! newargs[0] = newargs[1+hasargs] = unconst(program, char *);
if (hasargs)
newargs[1] = iargs;
- Raw text -