arm64: detach launchd into its own session - #15
Open
kkHAIKE wants to merge 4 commits into
Open
Conversation
On ARM64 launchd's early startup broadcasts signals via kill(0/-1, ...) and killpg(0, ...). These propagate back to darlingserver / darling-wrapper / timeout because they share the same pgrp by default, killing the whole test harness. Call setsid() before exec'ing launchd so signals stay contained. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…atch; dedup clock decls
* dtape_thread_save_state_to_user: restore the `} else` chaining the x86
block to the arm64 case so x86_64 no longer falls through to -ENOSYS
after copying state (matches dtape_thread_load_state_from_user).
* thread_{set,get}_state_internal ARM_THREAD_STATE: dispatch on count --
arm_unified_thread_state_t for unified callers (objc/WebKit), bare
arm_thread_state64_t for Darling-internal RPC paths -- mirroring XNU's
osfmk/arm64/status.c instead of always casting to a bare ts_64.
* timer.c / rtclock_arm64.c: factor the duplicated CLOCK_MONOTONIC /
struct timespec / clock_gettime declarations into a shared
duct-tape/src/linux_clock.h.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On ARM64 launchd's early startup broadcasts signals via
kill(0/-1, ...)andkillpg(0, ...). These propagate back todarlingserver/ thedarlingwrapper /timeoutbecause they share the same pgrp by default, killing the whole test harness.Call
setsid()after the fork-and-before-execve point oflaunchd, so launchd's process group is fresh and its signal broadcasts stay contained. Warn-and-continue on failure.Part of the ARM64 support series; the umbrella PR in
darlinghq/darlingreferences the rest.