summaryrefslogtreecommitdiff
path: root/os2/os2.c
diff options
context:
space:
mode:
authorIlya Zakharevich <ilya@math.berkeley.edu>1998-09-04 20:14:51 -0400
committerGurusamy Sarathy <gsar@cpan.org>1998-09-23 08:17:42 +0000
commita97be1210229297ea0fbef9273b534b7a5fa973c (patch)
tree0e546c3a629ef34512e48dd4a2fe2c6352bde609 /os2/os2.c
parent9fbbe8258ee64b30ca2a9bd24c0177c1bc79aef6 (diff)
downloadperl-a97be1210229297ea0fbef9273b534b7a5fa973c.tar.gz
OS/2 spawning typos
Message-Id: <199809050414.AAA19801@monk.mps.ohio-state.edu> p4raw-id: //depot/perl@1836
Diffstat (limited to 'os2/os2.c')
-rw-r--r--os2/os2.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/os2/os2.c b/os2/os2.c
index 75240ebbc3..882ec2b416 100644
--- a/os2/os2.c
+++ b/os2/os2.c
@@ -390,7 +390,7 @@ char *inicmd;
{
dTHR;
int trueflag = flag;
- int rc, pass = 1, err;
+ int rc, pass = 1;
char *tmps;
char buf[256], *s = 0;
char *args[4];
@@ -429,7 +429,8 @@ char *inicmd;
#endif
if (rc < 0 && pass == 1
&& (tmps == PL_Argv[0])) { /* Cannot transfer `really' via shell. */
- err = errno;
+ int err = errno;
+
if (err == ENOENT || err == ENOEXEC) {
/* No such file, or is a script. */
/* Try adding script extensions to the file name, and
@@ -581,7 +582,7 @@ char *inicmd;
/* Not found: restore errno */
errno = err;
}
- } else if (rc < 0 && pass == 2 && err == ENOENT) { /* File not found */
+ } else if (rc < 0 && pass == 2 && errno == ENOENT) { /* File not found */
char *no_dir = strrchr(PL_Argv[0], '/');
/* Do as pdksh port does: if not found with /, try without
@@ -596,7 +597,7 @@ char *inicmd;
warn("Can't %s \"%s\": %s\n",
((execf != EXECF_EXEC && execf != EXECF_TRUEEXEC)
? "spawn" : "exec"),
- PL_Argv[0], Strerror(err));
+ PL_Argv[0], Strerror(errno));
if (rc < 0 && (execf != EXECF_SPAWN_NOWAIT)
&& ((trueflag & 0xFF) == P_WAIT))
rc = 255 << 8; /* Emulate the fork(). */