Re: Shutting down VatTP

Thomas Leonard <[email protected]>
Newsgroups gmane.comp.lang.e.general
Message-ID <[email protected]>
On 15 October 2010 18:19, Kevin Reid <[email protected]> wrote:
> On Oct 15, 2010, at 11:50, Thomas Leonard wrote:
>
>> It's quite useful to be able to restart a vat without having to
>> restart
>> the whole JVM. This requires shutting down the listing sockets (among
>> other things), so that the new vat can start listening on the existing
>> socket.
>>
>> What's the best way to do this? I got it working in a hacky way like
>> this:
>>
>> http://gitorious.org/~tal-itinnov/repo-roscidus/it-innovation/commit/8b94a34e9e45df1ea3cdf933bfe3c96dedb2c317
>
> This is wrong: once onTheAir, the introducer should be safe to expose
> to untrusted clients that you're not bit-confining (that is, be
> defensively consistent): giving it a shutdown operation breaks this.
>
>> - How should this be exposed to E code?
> [...]
>> - Should vat.orderlyShutdown do this automatically?
>
> It seems to me that orderlyShutdown of a vat should shut down its
> Pluribus stack. I see no reason to do otherwise, and I am surprised it
> doesn't do so already.

I guess that CapTP should register itself as a DeadManSwitch with the
introducer's Runner and shut down then. But I don't see how to do
this:

- Runner.addDeadManSwitch is "protected", and I can't see how to get
the Runner anyway.
- Switches are only notified if they're bootrefs to another (non-dead) vat.

Nothing appears to be calling addDeadManSwitch currently. What's it for?

(also, I guess it would be good if you could shut down an introducer
without shutting down the vat, although shutting down the whole vat is
OK for my current needs)

Thanks,


-- 
Dr Thomas Leonard        http://0install.net/
GPG: 9242 9807 C985 3C07 44A6  8B9A AE07 8280 59A5 3CC1
GPG: DA98 25AE CAD0 8975 7CDA  BD8E 0713 3F96 CA74 D8BA

_______________________________________________
e-lang mailing list
[email protected]
http://www.eros-os.org/mailman/listinfo/e-lang
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.