diff options
author | Ilya Zakharevich <ilya@math.ohio-state.edu> | 1997-09-05 00:00:00 +0000 |
---|---|---|
committer | Tim Bunce <Tim.Bunce@ig.co.uk> | 1997-09-05 00:00:00 +0000 |
commit | a0914d8e6ce0e8ec3db295c01deb09b180fdd56b (patch) | |
tree | 2da1077af4c0d1b11f74ce9e49f3bbdc5c8b1132 /os2 | |
parent | ebb5e036b06bdbdf80d13d81c589d66a1818c276 (diff) | |
download | perl-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.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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; } } |