Skip to content

Commit 0507674

Browse files
committed
Document the new cleanup function using a Doxygen-style comment
1 parent 4f85cfe commit 0507674

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/libstore/unix/build/darwin-derivation-builder.cc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,15 @@ struct DarwinDerivationBuilder : DerivationBuilderImpl
227227
NULL, drv.builder.c_str(), NULL, &attrp, stringsToCharPtrs(args).data(), stringsToCharPtrs(envStrs).data());
228228
}
229229

230+
/**
231+
* Cleans up all System V IPC objects owned by the specified user.
232+
*
233+
* On Darwin, IPC objects (shared memory segments, message queues, and semaphore)
234+
* can persist after the build user's processes are killed, since there are no IPC namespaces
235+
* like on Linux. This can exhaust kernel IPC limits over time.
236+
*
237+
* Uses sysctl to enumerate and remove all IPC objects owned by the given UID.
238+
*/
230239
void cleanupSysVIPCForUser(uid_t uid)
231240
{
232241
struct IpcsCommand ic;

0 commit comments

Comments
 (0)