Merge nucleic/olive-jade-civet-rznt into dev
This commit is contained in:
@@ -392,11 +392,44 @@ internal static class Program
|
|||||||
Console.WriteLine();
|
Console.WriteLine();
|
||||||
Console.WriteLine(" second Session with the SAME name — attach, or reserved?");
|
Console.WriteLine(" second Session with the SAME name — attach, or reserved?");
|
||||||
var second = CreateSession(settingsType, sessionType, name, dataDir, "second");
|
var second = CreateSession(settingsType, sessionType, name, dataDir, "second");
|
||||||
Console.WriteLine(second is not null
|
if (second is null)
|
||||||
? " → CONSTRUCTED. The compat SDK may attach by name; check `wslc container ps` for "
|
{
|
||||||
+ "the first session's containers, and record it against D13 (§13.1)."
|
Console.WriteLine(" → REFUSED (see the HRESULT above). D13's premise holds: the compat "
|
||||||
: " → REFUSED (see the HRESULT above). D13's premise holds: the compat surface cannot "
|
+ "surface cannot re-adopt a session, so reattach needs "
|
||||||
+ "re-adopt a session, so reattach needs IWSLCSessionManager::OpenSessionByName.");
|
+ "IWSLCSessionManager::OpenSessionByName.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Starting it is one more signal: re-adopting a RUNNING session should be a no-op,
|
||||||
|
// whereas a genuinely separate session would be booting a second VM here.
|
||||||
|
if (start is not null)
|
||||||
|
{
|
||||||
|
try { start.Invoke(second, null); Console.WriteLine(" second Start() ok"); }
|
||||||
|
catch (TargetInvocationException e)
|
||||||
|
{
|
||||||
|
Console.WriteLine($" second Start() threw {Describe(e.InnerException)}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Console.WriteLine(" → CONSTRUCTED — the constructor did NOT refuse.");
|
||||||
|
Console.WriteLine();
|
||||||
|
// Be honest about what this does and does not show. A constructed object is not proof
|
||||||
|
// of attachment: construction may simply be lazy, and WSLC_E_SESSION_RESERVED clearly
|
||||||
|
// fires under SOME condition or it would not exist in wslc.idl. The compat surface has
|
||||||
|
// no enumeration, so identity cannot be settled from inside this process.
|
||||||
|
Console.WriteLine(" This does NOT by itself prove it re-adopted the first session —");
|
||||||
|
Console.WriteLine(" construction may be lazy, and WSLC_E_SESSION_RESERVED exists in");
|
||||||
|
Console.WriteLine(" wslc.idl, so it fires under some condition. The compat surface has");
|
||||||
|
Console.WriteLine(" no enumeration, so identity cannot be settled from in here.");
|
||||||
|
Console.WriteLine();
|
||||||
|
Console.WriteLine(" DECISIVE CHECK — run this now: wslc session ls");
|
||||||
|
Console.WriteLine($" ONE session named '{name}' → it attached; the SESSION half of");
|
||||||
|
Console.WriteLine(" §2.3 reattach may not need the");
|
||||||
|
Console.WriteLine(" internal COM interface after all.");
|
||||||
|
Console.WriteLine($" TWO sessions named '{name}' → it did not; two VMs are running and");
|
||||||
|
Console.WriteLine(" the name is not an identity.");
|
||||||
|
Console.WriteLine(" Either way the CONTAINER half of D13 is unaffected: there is still");
|
||||||
|
Console.WriteLine(" no way to enumerate containers on the compat surface.");
|
||||||
|
}
|
||||||
|
|
||||||
Console.WriteLine();
|
Console.WriteLine();
|
||||||
Console.WriteLine(" session left running — `wslc session ls`; whether it outlives this "
|
Console.WriteLine(" session left running — `wslc session ls`; whether it outlives this "
|
||||||
|
|||||||
Reference in New Issue
Block a user