Dan Sugalski <[EMAIL PROTECTED]> wrote: > yOn Fri, 29 Aug 2003, Leopold Toetsch wrote:
>> I have checked in a small change: >> - B<exit>(in INT) throws an exception with severity C<EXCEPT_exit> and >> the given exit status. > I think we might want to go a little further than this, but it's fine for > now. We can extend it with B<exit>(in PMC) later. ,--[ core.ops ]---------------------------------------------------------- | =item B<exit>(in INT) | | Exit the interpreter with exit_status $1. If you want to communicate an | extended exit status, create an exception with severity B<EXCEPT_exit> | and throw it. `------------------------------------------------------------------------ For the rare? cases, that more then a single "int exit_status" is needed, you need a PMC anyway for your proposed opcode. This should work already now: create the exception PMC as above, set "_message" property and "_type" (exit status) -> message gets printed before exiting. >> I'd like to change the startup parameters too: move the ARGV array from >> P0 to P5. This would allow main to be: > Sure, go for it. We can revisit which things go where as well, sinc ewe > may have to pass in other htings, like IO handles and such. I think most of that stuff should be done by the (new) interpreter->clone() vtable. "man 2 clone /CLONE_FILES" and such. > Dan leo