[M3devel] NT386GNU status/fishing for guesses..
Jay
jayk123 at hotmail.com
Sat Feb 16 20:30:01 CET 2008
PROCEDURE ExecChild( argx: ArrCStr; (* see "AllocArgs" for layout *) envp: Ctypes.char_star_star; wdstr: Ctypes.char_star; stdin, stdout, stderr: INTEGER) : INTEGER RAISES {} =(* Modify Unix state using "stdin", ..., and invoke execve using "argx" and "envp". Do not invoke scheduler, allocator, or exceptions. Return only if a fatal Unix error is encountered, in which case Cerrno.GetErrno() is set. *) VAR res := 0; t: Ctypes.char_star; BEGIN IF wdstr # NIL THEN IF Unix.chdir(wdstr) < 0 THEN RETURN -1; END END;(* IF NOT (SetFd(0, stdin) AND SetFd(1, stdout) AND SetFd(2, stderr)) THEN RETURN -1; END;
FOR fd := 3 TO Unix.getdtablesize() - 1 DO EVAL Unix.close(fd) (* ignore errors *) END;*)
Without those lines commented out, only ever one file gets compiled.
The process create for the second cm3cg fails (but not for the first as).
Nearby code uses 99 for the exit code.
With these commented out, it proceeds to compile everything (at least in one directory).
Some combinations of the one block vs. the other (I realize there's only four cominations total) go and compile everything but claim failure at the end.
Different point is that subsequent runs of cm3 always recompile everything.
Probably the timestamps are misunderstood. I need to check the stat structure.
Any one have any wild guesses on the process create angle?
I figured this out with strace.
The SetFd calls lead to dup failing because 0 isn't open.
The Cygwin code is all very gnarly.
For example when you do vfork + exec, it seems to relaunch the current .executable first (with kernel32.dll CreateProcess) and then child executables -- running cm3cg+as on just one file takes six CreateProcess calls -- cm3, sh, cm3cg, cm3, sh, as.
I wonder if "Services for Unix" would satisfy folks at least as well as Cygwin. It is a free (beer) download..
- Jay
_________________________________________________________________
Need to know the score, the latest news, or you need your Hotmail®-get your "fix".
http://www.msnmobilefix.com/Default.aspx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20080216/b2dc8377/attachment-0002.html>
More information about the M3devel
mailing list