Repository navigation
Conversation
Quoting from the man page of kill(2):
If pid is -1:
If the user has super-user privileges, the signal is sent to all processes
excluding system processes and the process sending the signal. If the user
is not the super user, the signal is sent to all processes with the same uid
as the user, excluding the process sending the signal. No error is returned
if any process could be signaled.
Unfortunately this is not the case and the process sending the signal is killed
as well, so we can't assume that wait() will return 0 if the process drops dead
in-between.
Signed-off-by: aszlig <[email protected]>
|
It seems that someone was actually facing the same problem two years ago: |
|
There is a security issue here: the builder could kill the killer process before it does kill(-1), thereby preventing the builder from being killed. Thus it can stick around to interfere with other builds running under the same uid. |
|
Which would mean that this security issue exists because of a broken Maybe some Darwin people can shed some light on what's the issue here? |
|
Closing in favour of #99. |
…merge Merge NixOS#3801 Constant space `addToStoreFromDump`
Bump version to 3.0.0, rename nix to determinate-nix
The nine `builtins.isXxx` primops (`isNull`, `__isFunction`, `__isInt`,
`__isFloat`, `__isString`, `__isBool`, `__isPath`, `__isAttrs`,
`__isList`) had byte-identical bodies that only varied in the
`ValueType` enum tag they compared against:
state.forceValue(*args[0], pos);
v.mkBool(args[0]->type() == <tag>);
Replace each `prim_isXxx` definition with a call to a single
`makeTypeCheck(ValueType target)` factory that returns a closure with
the same shape. The nine `RegisterPrimOp` registrations keep their
own names, args and docstrings - only their `.impl` is now
`makeTypeCheck(<tag>)` rather than a dedicated free function.
`fun<PrimOpFun>` (the type of `PrimOp::impl`) accepts capturing
lambdas via its `std::function`-based constructor, so no extra
trampoline is needed.
Refs candidate NixOS#66.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…ards Adds **Branch:** lines to the 30 catalog entries that landed as commits on the four cleanup shard branches (libexpr, libstore, libutil, nix-cli) over the previous batch. Per-shard tally (commits on each branch beyond the previously-pushed tip): - libexpr (HEAD 437eea9 -> +10): NixOS#64, NixOS#66, NixOS#68, NixOS#106, NixOS#107, NixOS#109, NixOS#110, NixOS#112, NixOS#196, NixOS#199. Two of the original twelve were skipped on rule grounds: NixOS#194 (LookupPath::Elem flatten) — the candidate framing claimed the types were internal, but search-path.hh ships via install_headers, so collapsing is a public-ABI break, not a trivial flatten; NixOS#197 (one-arg findFile drop) — EvalState::lookupPath is a private member, so the candidate's "have callers pass it explicitly" prescription cannot apply. - libstore (HEAD 5f5b815 -> +12): NixOS#4, NixOS#5, NixOS#6, NixOS#14, NixOS#47, NixOS#82, NixOS#114, NixOS#115, NixOS#119, NixOS#157, NixOS#159, NixOS#165. Several departures from the literal prescription, recorded in each commit body and in the per-candidate Branch line: NixOS#14 lifted only getRemoteFSAccessor with a getLocalNarCacheDir hook (left the trivial getFSAccessor overrides per-class); NixOS#115 extracted only the prelude (lockProfile + findGenerations) since two callers use stateful reverse iteration; NixOS#119 confirmed init's setDefault is a different shape and stayed out; NixOS#159 dropped the assert(!childEOF) defensive check after walking Goal::handleEOF producers; NixOS#165 used option (b) of the prescription (a new derivation-output-fwd.hh) because option (a) would have introduced an include cycle. - libutil (HEAD 784a4f4 -> +3): NixOS#29, NixOS#99, NixOS#117. NixOS#29's commit body caveat (XDG_*_HOME / XDG_CONFIG_DIRS reads moved from per-call to cached) is recorded on the candidate Branch line. - nix-cli (HEAD 48524e0 -> +5): NixOS#24, NixOS#77, NixOS#89, NixOS#91, NixOS#187. NixOS#91 shipped the GcRootNamer + nameForCurrent consolidation but deferred the candidate's addPermRootWithCounter free helper because three behavioural differences across call sites (rootNr increment position, absPath timing, printGCWarning conditions on store2 null) would have either changed user-visible path naming or grown the API. STATUS.md's cleanup-branches table is updated with each shard's expanded Addresses list, and the Status column now distinguishes the already-pushed tips (libfetchers/libflake/libmain remain Pushed since they got no new commits) from the four shards whose new commits are local-only. Push policy is explicit-only — none of the four shard branches has been pushed past its prior tip. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
The nine `builtins.isXxx` primops (`isNull`, `__isFunction`, `__isInt`,
`__isFloat`, `__isString`, `__isBool`, `__isPath`, `__isAttrs`,
`__isList`) had byte-identical bodies that only varied in the
`ValueType` enum tag they compared against:
state.forceValue(*args[0], pos);
v.mkBool(args[0]->type() == <tag>);
Replace each `prim_isXxx` definition with a call to a single
`makeTypeCheck(ValueType target)` factory that returns a closure with
the same shape. The nine `RegisterPrimOp` registrations keep their
own names, args and docstrings - only their `.impl` is now
`makeTypeCheck(<tag>)` rather than a dedicated free function.
`fun<PrimOpFun>` (the type of `PrimOp::impl`) accepts capturing
lambdas via its `std::function`-based constructor, so no extra
trampoline is needed.
Refs candidate NixOS#66.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Task NixOS#66 targeted argCdiHex specifically, but the audit turned up peers: initialCdi, childCdi (locals), getCdi() (method on OuterObject / TracingCallbackArg), plus scattered "CDI" / "CID" / "CDIs" / "CIDs" in comments. All refer to what the vocabulary now calls a state hash. Renames: argCdiHex (local) → argSubjectHashHex initialCdi (local) → initialStateHash childCdi (test locals) → childStateHash getCdi() (method) → getStateHash() CDI[s] / CID[s] (prose) → state hash[es] No behaviour change. Tests green (325/0/7). Assisted-by: Claude Code (Claude Opus 4.6-4.7)
Quoting from the man page of kill(2):
Unfortunately this is not the case and the process sending the signal is killed as well, so we can't assume that wait() will return 0 if the process drops dead in-between.