Race-free process creation in the GNU C Library
Race-free process creation in the GNU C Library
Posted Sep 1, 2023 20:57 UTC (Fri) by pbonzini (subscriber, #60935)In reply to: Race-free process creation in the GNU C Library by bluca
Parent article: Race-free process creation in the GNU C Library
Any process that wants to spawn a process and use pidfd, but also write the pid in a log file or debug trace? Ignoring portability for a second, it could even be something like make or cargo.
Posted Sep 1, 2023 21:19 UTC (Fri)
by bluca (subscriber, #118303)
[Link] (10 responses)
Posted Sep 1, 2023 21:30 UTC (Fri)
by pbonzini (subscriber, #60935)
[Link] (9 responses)
Posted Sep 1, 2023 23:23 UTC (Fri)
by bluca (subscriber, #118303)
[Link] (4 responses)
Posted Sep 1, 2023 23:46 UTC (Fri)
by josh (subscriber, #17465)
[Link] (3 responses)
Posted Sep 2, 2023 0:43 UTC (Sat)
by bluca (subscriber, #118303)
[Link] (2 responses)
Posted Sep 2, 2023 1:08 UTC (Sat)
by josh (subscriber, #17465)
[Link] (1 responses)
(That operation would still be useful when passed a pidfd from elsewhere, but not *necessary* for the common case where you got the pidfd by creating a process.)
Posted Sep 2, 2023 1:37 UTC (Sat)
by bluca (subscriber, #118303)
[Link]
Posted Sep 3, 2023 4:14 UTC (Sun)
by IanKelling (subscriber, #89418)
[Link] (3 responses)
I don't think it is hypothetical. From my sysadmin perspective, I often build software in a chroot without a /proc mount. Very rarely, the build has needed it and I wanted to know why. Bind bounding /proc, I see find shows 546,160 user-listabable files and 304,803 user readable files. Making that a requirement to create processes just because opt-in to an api that avoids a race condition would be roughly a regression in my book.
Posted Sep 3, 2023 10:26 UTC (Sun)
by bluca (subscriber, #118303)
[Link] (2 responses)
Posted Sep 4, 2023 9:16 UTC (Mon)
by taladar (subscriber, #68407)
[Link] (1 responses)
Posted Sep 4, 2023 9:53 UTC (Mon)
by bluca (subscriber, #118303)
[Link]
Race-free process creation in the GNU C Library
Race-free process creation in the GNU C Library
Race-free process creation in the GNU C Library
Race-free process creation in the GNU C Library
Race-free process creation in the GNU C Library
Race-free process creation in the GNU C Library
Race-free process creation in the GNU C Library
Race-free process creation in the GNU C Library
Race-free process creation in the GNU C Library
Race-free process creation in the GNU C Library
Race-free process creation in the GNU C Library