Skip to content

Commit

Permalink
exec-util: use close_all_fds_without_malloc() from freeze()
Browse files Browse the repository at this point in the history
(cherry picked from commit ab27b2f)

Resolves: RHEL-18302
  • Loading branch information
poettering authored and msekletar committed Dec 22, 2023
1 parent cb9eea3 commit d8c98a3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/basic/process-util.c
Original file line number Diff line number Diff line change
Expand Up @@ -991,8 +991,10 @@ _noreturn_ void freeze(void) {

log_close();

/* Make sure nobody waits for us on a socket anymore */
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);

sync();

Expand Down

0 comments on commit d8c98a3

Please sign in to comment.