Skip to content

gmain: close pidfd when finalizing GChildWatchSource

Christian Hergert requested to merge wip/chergert/fix-2708 into main

A file-descriptor was created with the introduction of pidfd_getfd() but nothing is closing it when the source finalizes. The GChildWatchSource is the creator and consumer of this FD and therefore responsible for closing it on finalization.

The pidfd leak was introduced in !2408 (merged).

This fixes issues with Builder where anon_inode:[pidfd] exhaust the available FD limit for the process.

Fixes #2708 (closed)

Merge request reports