diff --git a/beweise/leine-breakaway.js b/beweise/leine-breakaway.js index ac753cb..98ea384 100644 --- a/beweise/leine-breakaway.js +++ b/beweise/leine-breakaway.js @@ -50,10 +50,10 @@ const CreateProcessW = kernel32.func( const ENKEL = 'C:\\Windows\\System32\\cmd.exe' const ENKEL_ZEILE = '"C:\\Windows\\System32\\cmd.exe" /c ping -n 40 127.0.0.1' -function innen(mitBreakaway) { +function innen(jobErlaubtAusklinken, kindKlinktSichAus) { const job = CreateJobObjectW(null, null) const info = Buffer.alloc(STRUKTUR_GROESSE) - info.writeUInt32LE(KILL_ON_JOB_CLOSE | (mitBreakaway ? BREAKAWAY_OK : 0), LIMIT_FLAGS_OFFSET) + info.writeUInt32LE(KILL_ON_JOB_CLOSE | (jobErlaubtAusklinken ? BREAKAWAY_OK : 0), LIMIT_FLAGS_OFFSET) SetInformationJobObject(job, JOB_KLASSE, info, STRUKTUR_GROESSE) AssignProcessToJobObject(job, GetCurrentProcess()) @@ -66,7 +66,7 @@ function innen(mitBreakaway) { // IHR, nicht mit der Arbeitsgruppe — der erste Messlauf am 01.09.2026 // lief genau in diese Falle und zeigte fälschlich „Ausklinken wirkt // nicht". Beide Fälle bekommen es, damit der Vergleich fair bleibt. - const flags = CREATE_NO_WINDOW | (mitBreakaway ? CREATE_BREAKAWAY_FROM_JOB : 0) + const flags = CREATE_NO_WINDOW | (kindKlinktSichAus ? CREATE_BREAKAWAY_FROM_JOB : 0) const ok = CreateProcessW(ENKEL, zeile, null, null, false, flags, null, null, si, pi) if (!ok) { @@ -84,8 +84,12 @@ function lebt(pid) { function aussen() { const faelle = [ - ['OHNE Ausklinken (so macht es electron-updater)', 'innen-ohne', false], - ['MIT Ausklinken (so macht es Rippy ab 5.1.4)', 'innen-mit', true], + ['1) Leine wie bisher, Kind normal — die Ausgangslage', 'alt', false], + // DIE Regressionsfrage: Weicht das blosse ERLAUBEN die Leine auf? + // Wenn hier JA stuende, waere Paragraph 3.3 kaputt und makemkvcon + // koennte als Waise das Laufwerk festhalten (der rc10-Fund). + ['2) Leine erlaubt Ausklinken, Kind normal — MUSS weiter sterben', 'erlaubt-normal', false], + ['3) Leine erlaubt Ausklinken, Kind klinkt sich aus — der Installer', 'erlaubt-aus', true], ] for (const [name, modus, erwartetLebend] of faelle) { const ausgabe = execFileSync(process.execPath, [__filename, modus], { encoding: 'utf8' }).trim() @@ -104,6 +108,7 @@ function aussen() { } const modus = process.argv[2] ?? '' -if (modus === 'innen-ohne') innen(false) -else if (modus === 'innen-mit') innen(true) +if (modus === 'alt') innen(false, false) +else if (modus === 'erlaubt-normal') innen(true, false) +else if (modus === 'erlaubt-aus') innen(true, true) else aussen()