=================================================================== RCS file: /cvs/djgpp/djgpp/src/libc/dos/process/dosexec.c,v retrieving revision 1.7 retrieving revision 1.8 diff -p -u -r1.7 -r1.8 --- djgpp/src/libc/dos/process/dosexec.c 2000/06/14 14:23:44 1.7 +++ /cvs/djgpp/djgpp/src/libc/dos/process/dosexec.c 2000/07/15 14:19:47 1.8 @@ -1,3 +1,4 @@ +/* Copyright (C) 2000 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ @@ -886,6 +887,16 @@ static int script_exec(const char *progr else return -1; + /* pinterp may contain backslashes because of __dosexec_find_on_path. + Convert them to slashes so Unix shell scripts can run without editing. */ + p = pinterp; + while (*p) + { + if ((*p) == '\\') + *p = '/'; + ++p; + } + i = (*spawnfunc)(P_WAIT, pinterp, newargs, envp); return i; }