summaryrefslogtreecommitdiff
path: root/os2/os2.c
diff options
context:
space:
mode:
authorMalcolm Beattie <mbeattie@sable.ox.ac.uk>1997-10-16 11:09:25 +0000
committerMalcolm Beattie <mbeattie@sable.ox.ac.uk>1997-10-16 11:09:25 +0000
commitd58bf5aa3d3631a46847733b1ff1985b30140228 (patch)
tree406c095d697ae0ae82bbf187e5c65151bd41232a /os2/os2.c
parentc7848ba184fac8eca4125f4296d6e09fee2c1846 (diff)
parent50e27ac33704d6fb34d4be7cfb426b2097b27505 (diff)
downloadperl-d58bf5aa3d3631a46847733b1ff1985b30140228.tar.gz
Merge maint-5.004 branch (5.004_04) with mainline.
p4raw-id: //depot/perl@137
Diffstat (limited to 'os2/os2.c')
-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;
}
}