]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
exec-util: use close_all_fds_without_malloc() from freeze()
authorLennart Poettering <lennart@poettering.net>
Thu, 29 Jul 2021 14:50:44 +0000 (16:50 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 27 Oct 2021 15:56:36 +0000 (17:56 +0200)
src/basic/process-util.c

index 5c56a59aabe76df39ec82ef33516519768ed6626..06493f77995f548957c41bf456c60fac92e41ed7 100644 (file)
@@ -1620,8 +1620,10 @@ bool invoked_as(char *argv[], const char *token) {
 _noreturn_ void freeze(void) {
         log_close();
 
-        /* Make sure nobody waits for us on a socket anymore */
-        (void) close_all_fds(NULL, 0);
+        /* Make sure nobody waits for us (i.e. on one of our sockets) anymore. Note that we use
+         * close_all_fds_without_malloc() instead of plain close_all_fds() here, since we want this function
+         * to be compatible with being called from signal handlers. */
+        (void) close_all_fds_without_malloc(NULL, 0);
 
         /* Let's not freeze right away, but keep reaping zombies. */
         for (;;) {