]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lsfd: Refactor the pidfd logic into lsfd-pidfd.c
authorXi Ruoyao <xry111@xry111.site>
Wed, 3 Apr 2024 07:29:34 +0000 (15:29 +0800)
committerXi Ruoyao <xry111@xry111.site>
Wed, 3 Apr 2024 09:28:37 +0000 (17:28 +0800)
commitbf6645dc1edef09ad378cc5b9eb2c93861408735
tree22948c07123eda9c043854f2178c57c741b81c0f
parent10add327c608b11b3d70215048aade4d1797b1fd
lsfd: Refactor the pidfd logic into lsfd-pidfd.c

We'll reuse these logic for pidfd support on Linux >= 6.9.  This should
be a no-functional change.

Besides moving the code, this change also renames anon_pidfd_data to
pidfd_data, and removes a redundant nullity check for free (because
free(NULL) will just do nothing per the C standard).

Signed-off-by: Xi Ruoyao <xry111@xry111.site>
misc-utils/Makemodule.am
misc-utils/lsfd-pidfd.c [new file with mode: 0644]
misc-utils/lsfd-pidfd.h [new file with mode: 0644]
misc-utils/lsfd-unkn.c
misc-utils/meson.build