1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-08 19:46:02 +01:00

Document the new cleanup function using a Doxygen-style comment

This commit is contained in:
Jean-François Roche 2025-11-04 20:56:15 +00:00
parent 4f85cfe824
commit 0507674a13

View file

@ -227,6 +227,15 @@ struct DarwinDerivationBuilder : DerivationBuilderImpl
NULL, drv.builder.c_str(), NULL, &attrp, stringsToCharPtrs(args).data(), stringsToCharPtrs(envStrs).data()); NULL, drv.builder.c_str(), NULL, &attrp, stringsToCharPtrs(args).data(), stringsToCharPtrs(envStrs).data());
} }
/**
* Cleans up all System V IPC objects owned by the specified user.
*
* On Darwin, IPC objects (shared memory segments, message queues, and semaphore)
* can persist after the build user's processes are killed, since there are no IPC namespaces
* like on Linux. This can exhaust kernel IPC limits over time.
*
* Uses sysctl to enumerate and remove all IPC objects owned by the given UID.
*/
void cleanupSysVIPCForUser(uid_t uid) void cleanupSysVIPCForUser(uid_t uid)
{ {
struct IpcsCommand ic; struct IpcsCommand ic;