Skip to content

Commit 9517d47

Browse files
committed
plan: add freebsd-notifyd porting plan
Companion to launchd/configd/kmodloader/asl. Ports Apple's notifyd + libnotify (APSL, latest tag Libnotify-98.5 at apple-oss-distributions/ Libnotify) — the lightweight named-event pub/sub bus that ~everything on macOS uses for cross-process coordination. Drops Mach IPC + Mach-allocated shared memory. Replaces with: GNUstep Distributed Objects over AF_UNIX for the daemon-client channel; POSIX shm_open(2) + mmap(2) for the state-value pages (preserves Apple's zero-IPC-read characteristic for high-frequency state queries — volume level, network reachability, etc.). Library (libnotify) C API stays byte-for-byte stable. Apple-derived apps (gershwin desktop, third-party Cocoa ports) link our libnotify.so unchanged. Source compat is mandatory. Drops one delivery type: NOTIFY_TYPE_PORT (Mach port wakeup) — apps source-port to NOTIFY_TYPE_DISPATCH or NOTIFY_TYPE_FD. Net code change in consumer apps is ~5 lines. Lives in the monorepo under notifyd/ alongside src/ (launchd), configd/, kmodloader/, asl/. Phase 7+ work — sequenced after configd lands. Promotion happens when first Apple-derived app shows up needing libnotify, OR when configd's DO-callback fanout becomes a many-subscribers bottleneck. Significant section §8 details concrete gershwin use cases: theme fanout, app activation events, battery/power state, network state, NSUserDefaults cross-app coordination, and the launchd LaunchEvents integration that replaces the proposed RequiresPhase mechanism with a more general notifyd-driven model.
1 parent 2eb3fe4 commit 9517d47

1 file changed

Lines changed: 558 additions & 0 deletions

File tree

0 commit comments

Comments
 (0)