summaryrefslogtreecommitdiff
path: root/os2
diff options
context:
space:
mode:
authorIlya Zakharevich <ilya@math.ohio-state.edu>1997-09-05 00:00:00 +0000
committerTim Bunce <Tim.Bunce@ig.co.uk>1997-09-05 00:00:00 +0000
commita0914d8e6ce0e8ec3db295c01deb09b180fdd56b (patch)
tree2da1077af4c0d1b11f74ce9e49f3bbdc5c8b1132 /os2
parentebb5e036b06bdbdf80d13d81c589d66a1818c276 (diff)
downloadperl-a0914d8e6ce0e8ec3db295c01deb09b180fdd56b.tar.gz
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
Diffstat (limited to 'os2')
-rw-r--r--os2/os2.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/os2/os2.c b/os2/os2.c
index 80742429be..8a292e30f2 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;
}
}