From: Ilya Zakharevich Date: Fri, 5 Sep 1997 00:00:00 +0000 (+0000) Subject: Minor OS/2 patch for 4_03 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a0914d8e6ce0e8ec3db295c01deb09b180fdd56b;p=p5sagit%2Fp5-mst-13.2.git Minor OS/2 patch for 4_03 This makes "$^X -w script" skip the shell though $^X contains backslashes: Only os2/os2.c is touched. Enjoy, p5p-msgid: 199710032224.SAA15345@monk.mps.ohio-state.edu --- diff --git a/os2/os2.c b/os2/os2.c index 8074242..8a292e3 100644 --- a/os2/os2.c +++ b/os2/os2.c @@ -294,7 +294,7 @@ int execf; register char *s; char flags[10]; char *shell, *copt, *news = NULL; - int rc, added_shell = 0, err; + int rc, added_shell = 0, err, seenspace = 0; char fullcmd[MAXNAMLEN + 1]; #ifdef TRYSHELL @@ -346,6 +346,8 @@ int execf; if (*s == '\n' && s[1] == '\0') { *s = '\0'; break; + } else if (*s == '\\' && !seenspace) { + continue; /* Allow backslashes in names */ } doshell: if (execf == EXECF_TRUEEXEC) @@ -364,6 +366,8 @@ int execf; if (rc < 0) rc = 255 << 8; /* Emulate the fork(). */ if (news) Safefree(news); return rc; + } else if (*s == ' ' || *s == '\t') { + seenspace = 1; } }