[M3devel] m3cc often succeeds when it should fail
Jay K
jay.krell at cornell.edu
Fri Aug 27 18:51:57 CEST 2010
> Could you elaborate what exactly fails?
I use make | tee -a.
Any compilation failure..and still success.
> I don't think we should rely on bash3 or zsh or something else fancy.
Agreed.
> I'm also not sure that we can easily implement it in quake.
Here is where I disagree...though I'm not certain.
You put in a substantial sh emulation already, in sysutils, already exposed in quake.
m3-libs/sysutils/src/System.m3
PROCEDURE WaitForAll() : INTEGER =
VAR p: Process.T; ret: INTEGER := 0;
BEGIN
WHILE processes.size() > 0 DO
p := NARROW(processes.remlo(), Process.T);
ret := Process.Wait(p);
CloseFiles(cjobid);
INC(cjobid);
END;
RETURN ret;
END WaitForAll;
A small change there would do what I want I think.
PROCEDURE WaitForAll() : INTEGER =
VAR p: Process.T; ret := 0; overall := 0;
BEGIN
WHILE processes.size() > 0 DO
p := NARROW(processes.remlo(), Process.T);
ret := Process.Wait(p);
IF ret <> 0 AND overall = 0 THEN
overall := ret;
END;
CloseFiles(cjobid);
INC(cjobid);
END;
RETURN overall;
END WaitForAll;
It could be made optional, though the way I showed would be global for
that cm3 invocation, once set.
It'd probably be safe to make it not optional. ?
> The problem with pipelining logs through tee and losing result
> values is a standard one, but has no canonical solution AFAIK.
Agreed, based on my web searching last night.
- Jay
More information about the M3devel
mailing list