<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
I /think/ cm3/quake exposes the integer but I'll try to peek around, and at the other clients, and my own uses of try_exec/q_exec.<BR>
<BR>
There is /some/ validity to a "rich" exit code, more than 1 bit, but I realize it is controversial.<BR>
Windows has a 32 bit exit code. Perl on Windows truncates it to 8 bits.<BR>
When a process exits with a negative exit code, Perl on Windows gets confused and issues a strange error or runs it a second time (as if negative means CreateProcess failed, for a possible reason that the path was wrong.)<BR>
<BR>
- Jay<BR><BR><BR>
<HR id=stopSpelling>
<BR>
From: hosking@cs.purdue.edu<BR>To: jay.krell@cornell.edu<BR>Date: Wed, 14 Jan 2009 12:49:41 +1100<BR>CC: jkrell@elego.de; m3devel@elegosoft.com<BR>Subject: Re: [M3devel] [M3commit] CVS Update: cm3<BR><BR><BR>
<DIV><SPAN class=EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate">
<DIV style="WORD-WRAP: break-word"><SPAN class=EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate"><SPAN class=EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate"><SPAN class=EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate"><SPAN class=EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate"><SPAN class=EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate"><SPAN class=EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate"><SPAN class=EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate"><SPAN class=EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate">
<DIV>The current hack is not so bad, I suppose. I would prefer to come up with a solution that simply defines Process.Wait and System.Wait as returning a BOOLEAN indicating if the process terminated successfully or not. Are there any clients of these procedures that decode the bits in any more detail than simply testing non-zero?</DIV></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></DIV></SPAN></DIV><BR>
<DIV>
<DIV>On 14 Jan 2009, at 11:09, Jay wrote:</DIV><BR class=EC_Apple-interchange-newline>
<BLOCKQUOTE><SPAN class=EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate">
<DIV class=EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">
<DIV> > Sounds like your upgrade script</DIV>
<DIV> </DIV>
<DIV>Based on someone else's upgrade.sh.</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> > The alternative is to fold sysutils into m3core, where it can be used directly</DIV> <BR> Merging sysutils into m3core doesn't quite work, <SPAN class=EC_Apple-converted-space> </SPAN><BR> again only or due to bootstrapping from older builds. <SPAN class=EC_Apple-converted-space> </SPAN><BR><BR> The compiler uses sysutils. Older builds don't have it at all, <SPAN class=EC_Apple-converted-space> </SPAN><BR> and can't build m3core...but maybe again, make that hand patch <SPAN class=EC_Apple-converted-space> </SPAN><BR> Long.Rep = INTEGER? Or have an up to date compiler. <BR> <BR><BR> <BR> Pointless statement I'm making though, it devolves to: <SPAN class=EC_Apple-converted-space> </SPAN><BR> <SPAN class=EC_Apple-converted-space> </SPAN><BR> <SPAN class=EC_Apple-converted-space> </SPAN><BR> - have an up to date m3core in bootstrap <SPAN class=EC_Apple-converted-space> </SPAN><BR> - or have sysutils in bootstrap, which implies up to date m3core <SPAN class=EC_Apple-converted-space> </SPAN><BR> - or merge sysutils with m3core, which implies up to date m3core (and the second) <SPAN class=EC_Apple-converted-space> </SPAN><BR> => "have an up to date m3core" (and LONGINT capable compiler) <SPAN class=EC_Apple-converted-space> </SPAN><BR> <BR>And I think merging them is a fine idea.<BR>I generally like fewer larger pieces of reusable code, though<BR>the counterpoint is to have more smaller independently changable pieces.<BR> <BR><BR> Probably the scripts and/or m3makefiles should probe the compiler version<SPAN class=EC_Apple-converted-space> </SPAN><BR> and/or m3core version and/or sysutils presence and error clearly if it is too old/absent.<SPAN class=EC_Apple-converted-space> </SPAN><BR><BR> Possibly some "feature detection" feature is needed.<SPAN class=EC_Apple-converted-space> </SPAN><BR><BR> The compiler can just define Quake variables willy/nilly.<SPAN class=EC_Apple-converted-space> </SPAN><BR> if defined("HAS_LONGINT") <SPAN class=EC_Apple-converted-space> </SPAN><BR> Less clear how to probe m3core capability.<SPAN class=EC_Apple-converted-space> </SPAN><BR> Can try compiling a little program against the old WaitProcess signature.<SPAN class=EC_Apple-converted-space> </SPAN><BR> I'm leary of anything that resembles autoconf though (though I have autoconf-ish<BR> stuff in my config files already, probing some cm3cg and cm3 behavior).<SPAN class=EC_Apple-converted-space> </SPAN><BR> Oh...I looked at WaitProcess history. It looks like I introduced it, in 2008.<SPAN class=EC_Apple-converted-space> </SPAN><BR> So..while it never returned the full status word, there also wasn't much history<SPAN class=EC_Apple-converted-space> </SPAN><BR> to change.<SPAN class=EC_Apple-converted-space> </SPAN><BR> Compiler could expose m3core functionality via variables too, though that..is wrong.<BR> It could only expose the m3core it is linked to, not the one it is building.<BR> I guess the only way really is to define a version or date constant and folks<BR> can write constant expressions based on it, though that doesn't get you very far.<BR><BR> Less clear how to correctly probe for package existance.<SPAN class=EC_Apple-converted-space> </SPAN><BR> Easy to do ad-hoc by probing package store files, not sure what is the right way.<SPAN class=EC_Apple-converted-space> </SPAN><BR> <BR> <BR> I also want to try this "import_pkg" directive I see in the docs. It might help a lot here,<BR> if I understand it, and if it actually exists and resembles the doc I read.<BR> It sounds like it recompiles a package's source as part of another package, statically<BR> linking it. It would be bloating in the absence of build_standalone(), but not in its presence.<SPAN class=EC_Apple-converted-space> </SPAN><BR> <BR> <BR> > No! I did not want to do have this hack<SPAN class=EC_Apple-converted-space> </SPAN><BR><BR> Are the hacks this time in sysutils really so bad?<BR> m3core is left unadulterated.<BR> sysutils assumes waitpid(0) won't deadlock, which is true of kernel threads and cm3's use.<BR> <BR> - Jay<BR><BR><BR><BR>
<HR id=EC_stopSpelling>
<BR>From:<SPAN class=EC_Apple-converted-space> </SPAN><A href="mailto:hosking@cs.purdue.edu">hosking@cs.purdue.edu</A><BR>To:<SPAN class=EC_Apple-converted-space> </SPAN><A href="mailto:jay.krell@cornell.edu">jay.krell@cornell.edu</A><BR>Date: Wed, 14 Jan 2009 10:11:36 +1100<BR>CC:<SPAN class=EC_Apple-converted-space> </SPAN><A href="mailto:jkrell@elego.de">jkrell@elego.de</A>;<SPAN class=EC_Apple-converted-space> </SPAN><A href="mailto:m3devel@elegosoft.com">m3devel@elegosoft.com</A><BR>Subject: Re: [M3devel] [M3commit] CVS Update: cm3<BR><BR><BR>
<DIV><SPAN class=EC_EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate">
<DIV style="WORD-WRAP: break-word"><SPAN class=EC_EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate"><SPAN class=EC_EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate"><SPAN class=EC_EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate"><SPAN class=EC_EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate"><SPAN class=EC_EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate"><SPAN class=EC_EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate"><SPAN class=EC_EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate"><SPAN class=EC_EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate">
<DIV>On 14 Jan 2009, at 01:54, Jay wrote:</DIV></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></DIV></SPAN></DIV>
<DIV><BR class=EC_EC_Apple-interchange-newline>
<BLOCKQUOTE><SPAN class=EC_EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate">
<DIV class=EC_EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"> > fix for old compilers that can't compile LONGINT: define LongRep.T = INTEGER<BR><BR>Is that what bootstrapping should do?<BR> Automate that little patch for the first pass and undo it in the second?<BR> Then always building in dependency order?</DIV></SPAN></BLOCKQUOTE>
<DIV><BR></DIV>
<DIV>I would prefer to get all the bootstrap archives LONGINT-capable. Just do the patch by hand to build the initial archives and then forget about it.</DIV><BR>
<BLOCKQUOTE><SPAN class=EC_EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate">
<DIV class=EC_EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">Tonight I was trying to build from PPC_DARWIN 5.5.0.<BR>I figured, heck, maybe it supports LONGINT already, maybe I should just try<BR>building up in dependency order.<BR>But then I hit the problem of Compiler.i3 mismatch due to new targets.</DIV></SPAN></BLOCKQUOTE>
<DIV><BR></DIV>
<BLOCKQUOTE><SPAN class=EC_EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate">
<DIV class=EC_EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">So...is that correct?<BR>Does building in dependency order predictably fail if compiler has fewer targets than runtime?<BR>But starting with existing m3core/libm3 and first building the compiler against them predictably works?</DIV></SPAN></BLOCKQUOTE>
<DIV><BR></DIV>
<DIV>Yes, it works.</DIV><BR>
<BLOCKQUOTE><SPAN class=EC_EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate">
<DIV class=EC_EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">I've added targets a bunch and usually don't have a problem, but I can't say for certain what<BR>order I do things when I do this.<BR>Certainly "upgrade.py skipgcc" is something I run fairly often.<BR>It is very fast on NT386 (and unlike upgrade.sh, it doesn't build all of std).</DIV></SPAN></BLOCKQUOTE>
<DIV><BR></DIV>
<DIV>Sounds like your upgrade script</DIV><BR>
<BLOCKQUOTE><SPAN class=EC_EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate">
<DIV class=EC_EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">For now I put in two small hacks to sysutils, so it works with old m3core.</DIV></SPAN></BLOCKQUOTE>
<DIV><BR></DIV>
<DIV>No! I did not want to do have this hack. Let's just fix the boot archives to handle new m3core and have sysutils work as expected. The alternative is to fold sysutils into m3core, where it can be used directly. That might be a better solution given the dependency. Thoughts?</DIV><BR>
<BLOCKQUOTE><SPAN class=EC_EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate">
<DIV class=EC_EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">
<DIV>
<DIV>
<BLOCKQUOTE><SPAN class=EC_EC_EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate">
<DIV class=EC_EC_EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">
<DIV>
<BLOCKQUOTE><SPAN class=EC_EC_EC_EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate">
<DIV class=EC_EC_EC_EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">
<DIV>
<DIV>
<BLOCKQUOTE><SPAN class=EC_EC_EC_EC_EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate">
<DIV class=EC_EC_EC_EC_EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">
<DIV>
<BLOCKQUOTE><SPAN class=EC_EC_EC_EC_EC_EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate">
<DIV class=EC_EC_EC_EC_EC_EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">
<DIV>
<DIV>
<BLOCKQUOTE><SPAN class=EC_EC_EC_EC_EC_EC_EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate">
<DIV class=EC_EC_EC_EC_EC_EC_EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"> </DIV></SPAN></BLOCKQUOTE></DIV></DIV></DIV></SPAN></BLOCKQUOTE></DIV></DIV></SPAN></BLOCKQUOTE></DIV></DIV></DIV></SPAN></BLOCKQUOTE></DIV></DIV></SPAN></BLOCKQUOTE></DIV></DIV></DIV></SPAN></BLOCKQUOTE></DIV></DIV></SPAN></BLOCKQUOTE></DIV><BR></body>
</html>