Craig Berry writes:
> At 3:20 PM -0500 11/16/01, Charles Lane wrote:
> >This patch implements the change that Craig Berry suggested earlier this
> >week, to eliminate duplicate warning messages, and not to throw a warning
> >as a result of a subprocess error exit.

> But doesn't this change the behavior of the lib$spawn case?  We
> should return the value of substs (the completion status of the
> subprocess), it's just that sts (the status of initiating the
> subprocess) should be checked first (with a warning thrown if
> necessary).

Drat.

> In the safe_popen case, the initiation checking has
> already been done internally so we don't want to do it again and we
> can't anyway because all we get back from it is the process
> completion status.  You really don't want to do the checks that were
> designed for process initiation on the status you get from process
> completion.

> I think you want something like this instead:

(patch elided)
Well, the patch I posted put all the "set errno & throw warning" stuff
only after the lib$spawn, so I think the testing of sts is doing what
you want.

But you're right, the return needs to have substs from lib$spawn, not
sts.

Okay, apply on top of the previous patch:

diff -uBb vms/vms.c-orig vms/vms.c
--- vms/vms.c-orig      Fri Nov 16 17:03:26 2001
+++ vms/vms.c   Fri Nov 16 17:02:53 2001
@@ -5134,6 +5134,7 @@
                Strerror(errno));
       }
     }
+    sts = substs;
   }
   else {
     (void) safe_popen(cmd, "nW", (int *)&sts);
--
 Drexel University       \V                    --Chuck Lane
======]---------->--------*------------<-------[===========
     (215) 895-1545     _/ \  Particle Physics
FAX: (215) 895-5934     /\ /~~~~~~~~~~~        [EMAIL PROTECTED]

Reply via email to