Simon McVittie
7b1cd20696
Replace flatpak_close_fds_workaround() with g_fdwalk_set_cloexec()
...
flatpak_close_fds_workaround() wasn't technically async-signal-safe,
because the requirement for sysconf() to be async-signal-safe was
removed in POSIX.1-2008.
It could also leave high fds open in some cases: in practice
sysconf(_SC_OPEN_MAX) returns the soft resource limit, but if our
resource limit has been reduced by an ancestor process, we could
conceivably still have fds open and inherited above that number.
We can fix this by using g_fdwalk_set_cloexec() with GLib >= 2.79.2,
or the backport in libglnx with older GLib. This uses close_range()
if possible, falling back to rummaging in /proc with async-signal-safe
syscalls.
Signed-off-by: Simon McVittie <smcv@collabora.com >
2024-02-15 16:06:41 +00:00
..
2019-10-03 10:42:04 +02:00
2022-08-22 19:48:10 -07:00
2019-12-19 10:33:21 +01:00
2022-08-22 19:48:10 -07:00
2022-08-22 19:48:10 -07:00
2021-02-12 15:58:09 +01:00
2024-02-13 13:48:38 +00:00
2024-02-15 16:06:41 +00:00
2019-09-19 16:53:11 +00:00
2019-09-19 16:53:11 +00:00
2021-01-12 09:55:23 +01:00
2024-02-14 19:39:50 +00:00
2024-02-14 19:39:50 +00:00
2024-01-07 18:51:46 -06:00
2024-02-15 16:06:41 +00:00
2022-09-07 09:21:58 +02:00
2022-09-07 09:21:58 +02:00
2019-02-25 18:12:30 +00:00
2021-02-09 09:36:59 +01:00
2023-07-03 20:07:57 +02:00
2023-07-03 20:07:57 +02:00
2023-05-17 11:35:44 +01:00
2023-05-17 11:35:44 +01:00
2019-10-02 14:57:11 +02:00
2024-01-07 18:51:46 -06:00
2021-06-14 15:30:59 +01:00
2020-11-05 10:43:10 +01:00
2023-02-04 12:30:15 -06:00
2021-02-12 15:58:09 +01:00
2023-10-27 17:09:52 +01:00
2023-10-27 17:09:52 +01:00
2021-02-12 15:58:09 +01:00
2023-05-17 11:35:44 +01:00
2020-06-05 09:35:30 +02:00
2022-08-22 19:48:10 -07:00
2018-08-09 12:49:36 +00:00
2022-08-22 19:48:10 -07:00
2023-11-14 18:39:22 +00:00
2024-02-13 08:20:57 -06:00
2023-07-03 20:07:57 +02:00
2023-07-03 20:07:57 +02:00
2023-09-04 13:25:32 +01:00
2019-10-03 10:42:04 +02:00
2022-12-15 16:45:35 +00:00
2018-04-26 07:41:17 +00:00
2019-12-01 14:04:59 -05:00
2020-03-27 17:23:13 +01:00
2022-12-15 16:45:35 +00:00
2021-04-26 10:30:14 +02:00
2024-02-13 08:20:57 -06:00
2023-07-03 20:07:57 +02:00
2023-07-03 20:07:57 +02:00
2022-08-22 19:48:10 -07:00
2021-02-12 15:58:09 +01:00
2020-03-23 17:58:04 +01:00
2022-08-22 19:48:10 -07:00
2021-02-12 15:58:09 +01:00
2020-03-25 08:52:28 +01:00
2020-11-05 10:43:10 +01:00
2022-12-15 16:45:35 +00:00
2021-02-12 15:58:09 +01:00
2024-02-15 11:06:30 +00:00
2021-02-12 15:58:09 +01:00
2023-05-15 19:54:51 +01:00
2023-05-15 19:54:51 +01:00
2023-05-15 19:54:51 +01:00
2024-02-15 16:06:41 +00:00
2023-10-27 17:09:52 +01:00
2023-05-15 19:54:51 +01:00
2023-05-15 19:54:51 +01:00
2023-08-24 12:17:53 +02:00
2024-02-14 19:39:50 +00:00
2024-02-14 19:39:50 +00:00
2024-02-14 19:39:50 +00:00
2023-05-15 19:54:51 +01:00
2023-09-04 13:25:32 +01:00
2024-02-15 16:06:41 +00:00
2021-10-08 12:53:20 +02:00
2021-05-19 09:49:30 +02:00
2024-02-13 08:20:57 -06:00
2023-03-30 14:54:18 +02:00
2022-09-06 13:20:05 +02:00
2022-09-07 09:21:19 +02:00
2024-02-15 16:06:41 +00:00
2024-02-15 16:06:41 +00:00
2022-06-16 13:49:45 +02:00
2023-09-15 12:36:25 +01:00
2023-11-14 18:39:22 +00:00
2024-02-15 11:06:30 +00:00
2019-12-02 07:45:51 -05:00
2020-06-05 09:35:30 +02:00
2020-06-05 09:35:30 +02:00
2018-05-24 11:59:52 +00:00
2018-10-08 08:36:23 +00:00
2023-11-14 18:39:22 +00:00
2023-11-14 18:39:22 +00:00
2022-04-11 10:32:34 +02:00
2019-04-08 12:50:42 +00:00