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
  • Loading branch information
poettering committed Oct 27, 2021
1 parent 5cfa079 commit ab27b2f
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 @@ -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 (;;) {
Expand Down

0 comments on commit ab27b2f

Please sign in to comment.