From: Jarkko Hietaniemi Date: Sat, 17 Nov 2001 17:53:38 +0000 (+0000) Subject: Tweak from Charles Lane. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c8795d8b7ccb16a95758a094cc4a0572927cb4cc;p=p5sagit%2Fp5-mst-13.2.git Tweak from Charles Lane. p4raw-id: //depot/perl@13063 --- diff --git a/vms/vms.c b/vms/vms.c index fc254ea..0884863 100644 --- a/vms/vms.c +++ b/vms/vms.c @@ -5108,8 +5108,8 @@ Perl_do_spawn(pTHX_ char *cmd) if (!cmd || !*cmd) { hadcmd = 0; sts = lib$spawn(0,0,0,0,0,0,&substs,0,0,0,0,0,0); - if (!(sts & 1)) { - switch (sts) { + if (!(sts & 1)) { + switch (sts) { case RMS$_FNF: case RMS$_DNF: set_errno(ENOENT); break; case RMS$_DIR: @@ -5126,14 +5126,15 @@ Perl_do_spawn(pTHX_ char *cmd) _ckvmssts(sts); /* fall through */ default: /* SS$_DUPLNAM, SS$_CLI, resource exhaustion, etc. */ set_errno(EVMSERR); + } + set_vaxc_errno(sts); + if (ckWARN(WARN_EXEC)) { + Perl_warner(aTHX_ WARN_EXEC,"Can't spawn \"%s\": %s", + hadcmd ? cmd : "", + Strerror(errno)); + } } - set_vaxc_errno(sts); - if (ckWARN(WARN_EXEC)) { - Perl_warner(aTHX_ WARN_EXEC,"Can't spawn \"%s\": %s", - hadcmd ? cmd : "", - Strerror(errno)); - } - } + sts = substs; } else { (void) safe_popen(cmd, "nW", (int *)&sts);