You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9fc39d8
Browse filesBrowse the repository at this point in the historyBrowse files
libxpc plan: launchd boundary is 392.39, and correct the plist-schema claim
Research resolved three boundaries, not one: 329.3.3 (10.6.8) has zero xpc_
tokens, but 392.39 (10.7.5) is the last release that neither LINKS nor CALLS
libxpc -- its XPC is only two MIG subsystems on the ordinary mach_msg demux.
442.21 (10.8) is where xpc_pipe_try_receive takes the main loop. Same lag as
syslog and Libnotify.
Corrects an overstated claim: this page said a revert 'fails on plist schema'.
Unknown keys log a warning and continue; EnablePressuredExit and
PublishesEvents are already ignored by the local 842 tree; POSIXSpawnType is
inert behind a no-op shim; and KeepAlive, the key syslogd depends on, is
byte-identical across all three releases. The real regression is the reverse --
a revert would reintroduce the vm_allocate'd shared-page transaction protocol.
Also corrects the claim that the NextBSD-original launchd files would not port:
all three do, as does the MACH_PORT_INDEX fix.
Records the verified deletion shape (~1,475 contiguous lines) and that 392.39's
launchd_runtime2() is available as donor code.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013FP6vokobmZDdMwpxXgotF
<tr><td>syslog</td><td>148.8 (10.8.5)</td><tdclass="bad">Impossible in practice — <code>libsystem_asl.tproj</code> and XPC arrived in the <em>same</em> release (217.1.4). Before it the client library lived in Apple’s Libc, which NextBSD does not vendor, so syslogd would not link.</td></tr>
230
230
<tr><td>Libnotify</td><td>133.1.1 (10.10)</td><tdclass="bad">~1,300 lines re-derived to save ~250 deleted; loses the #78 MIG demux and #120 collections fixes.</td></tr>
231
-
<tr><td>launchd</td><td>Under research</td><tdclass="warn">Use 258’s <code>launchd_runtime.c</code> as the <strong>reference</strong> for the main loop, and port that shape into 842.</td></tr>
231
+
<tr><td>launchd</td><td>392.39 (10.7.5)</td><tdclass="warn">Use <strong>392.39</strong>’s <code>launchd_runtime2()</code> as donor code for the main loop; delete the XPC slab from 842 in place.</td></tr>
232
232
</table>
233
233
<p>Note the pattern that corrects this page’s original premise: <strong>components adopted XPC years after XPC shipped in 10.7</strong> — syslog in 10.9, Libnotify in 10.11. “Pre-XPC” never meant 10.6.</p>
234
-
<p>For launchd specifically, an actual revert also fails on schema: the shipped plists use <code>EnableTransactions</code> and <code>POSIXSpawnType</code>, both 10.7 keys. A 10.6 launchd silently ignores keys it does not know, and syslogd’s job starts only because <code>KeepAlive=true</code> makes it non-ondemand. Keeping launchd modern is the safe direction; 842 parses everything an older daemon ships, and the reverse is not true.</p>
234
+
<divclass="callout callout-bad">
235
+
<p><strong>Correction.</strong> An earlier version of this page said a launchd revert “fails on plist schema” because <code>EnableTransactions</code> and <code>POSIXSpawnType</code> would be silently dropped. Verified, that was overstated on every point: unknown keys log a warning and continue in all releases; <code>EnablePressuredExit</code> and <code>PublishesEvents</code> are <em>already</em> silently ignored by the local 842 tree because closed-source libxpc handles them; <code>POSIXSpawnType</code> is inert today since <code>posix_spawnattr_setprocesstype_np</code> is a NextBSD no-op shim; and <code>KeepAlive</code> — the key syslogd’s startup actually depends on — is byte-identical across 329, 392 and 842.</p>
236
+
<p>The real regression runs the other way: 329 and 392 implement <code>EnableTransactions</code> through a <code>vm_allocate</code>’d shared-page protocol, which a revert would <strong>reintroduce</strong> as a new porting liability, for a feature 842 provides as a free boolean.</p>
237
+
</div>
238
+
<p>The launchd revert is still the wrong choice, but for a plainer reason: ~860 lines of vendored-file edits would have to be re-found by hand in a file that diverges by 9,540 lines (392.39) or 12,200 (329.3.3), plus the shim set and three Makefiles for a different layout. The three NextBSD-original files — <code>launchd_plist_scan.c</code>, <code>launchd_early.c</code>, <code>forward_stubs.c</code> — do port cleanly, as does the <code>MACH_PORT_INDEX</code> fix.</p>
239
+
<p><strong>Use 392.39’s <code>launchd_runtime2()</code> as donor code for the main-loop rewrite</strong> (~150 lines of proven Apple <code>mach_msg</code>-on-a-port-set), and delete the XPC slab from 842 in place: <code>core.c:10367-11717</code> plus two smaller blocks, ~1,475 lines contiguous.</p>
235
240
236
241
<h2>6b. XPC adoption timeline — the premise this page had wrong</h2>
237
242
<p>XPC shipped in 10.7. Components adopted it years later, and several never did. Resolved against Apple’s own <code>distribution-macOS</code> manifest, not inferred from version numbers:</p>
<tr><td>launchd</td><td>392.39 (10.7.5)<br><spanclass="cite">last that does not link libxpc</span></td><td>442.21 (<strong>10.8</strong>)<br><spanclass="cite">first libxpc main loop</span></td><td>842.92.1 (10.9.5)</td><td>Load-bearing — PID 1’s loop</td></tr>
243
248
<tr><td>mDNSResponder</td><tdcolspan="2">XPC confined to <code>mDNSMacOSX/</code>, never vendored</td><td>2881.0.25 (macOS 26.0)</td><tdclass="good">0 — macro with no callers</td></tr>
244
249
<tr><td>configd</td><tdcolspan="2" class="good">Never adopted XPC — still MIG at macOS 26</td><td>NextBSD-original</td><tdclass="good">0</td></tr>
0 commit comments