Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 27 Jun 2022 10:38:50 +0000
From: "Laurent Bercot" <>
To:, "Nick Peng" <>
Subject: Re: BUG: Calling readdir/dirfd after vfork will cause deadlock.

>We can't close all file handles by iterating over all file handles 
>number, because the maximum number of files limit is set very large, 
>the performance of this method is too poor.
>And we can't use fork, fork will fail because of vm.overcommit_memory.
>In order to optimize this, the method we used is to read the file 
>handes in /proc/self/fd directory and close the file handles one by 

  This may be a rare instance where close_range(2) is useful, if you
don't mind being restricted to Linux (>= 5.9) and FreeBSD.


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.