<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>PROCEDURE ExecChild(<BR> argx: ArrCStr; (* see "AllocArgs" for layout *)<BR> envp: Ctypes.char_star_star;<BR> wdstr: Ctypes.char_star;<BR> stdin, stdout, stderr: INTEGER) : INTEGER<BR> RAISES {} =<BR>(* Modify Unix state using "stdin", ..., and invoke execve using<BR> "argx" and "envp". Do not invoke scheduler, allocator, or<BR> exceptions. Return only if a fatal Unix error is encountered, in<BR> which case Cerrno.GetErrno() is set. *)<BR> VAR res := 0; t: Ctypes.char_star;<BR> BEGIN<BR> IF wdstr # NIL THEN<BR> IF Unix.chdir(wdstr) < 0 THEN RETURN -1; END<BR> END;<BR>(*<BR> IF NOT (SetFd(0, stdin) AND SetFd(1, stdout) AND SetFd(2, stderr)) THEN<BR> RETURN -1;<BR> END;<BR>
FOR fd := 3 TO Unix.getdtablesize() - 1 DO<BR> EVAL Unix.close(fd) (* ignore errors *)<BR> END;<BR>*)<BR><BR>
Without those lines commented out, only ever one file gets compiled.<BR>
The process create for the second cm3cg fails (but not for the first as).<BR>
Nearby code uses 99 for the exit code.<BR>
<BR>
With these commented out, it proceeds to compile everything (at least in one directory).<BR>
<BR>
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.<BR>
<BR>
Different point is that subsequent runs of cm3 always recompile everything.<BR>
Probably the timestamps are misunderstood. I need to check the stat structure.<BR>
<BR>
Any one have any wild guesses on the process create angle?<BR>
I figured this out with strace.<BR>
The SetFd calls lead to dup failing because 0 isn't open.<BR>
<BR>
The Cygwin code is all very gnarly.<BR>
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.<BR>
<BR>
I wonder if "Services for Unix" would satisfy folks at least as well as Cygwin. It is a free (beer) download..<BR>
<BR>
- Jay<BR><br /><hr />Need to know the score, the latest news, or you need your HotmailŪ-get your "fix". <a href='http://www.msnmobilefix.com/Default.aspx' target='_new'>Check it out.</a></body>
</html>