From mboxrd@z Thu Jan 1 00:00:00 1970 From: KOSAKI Motohiro Subject: Re: [PATCH] nextfd(2) Date: Wed, 04 Apr 2012 09:38:31 -0700 Message-ID: <4F7C7907.3090808@gmail.com> References: <20120401125741.GA7484@p183.telecom.by> <4F7A3CC2.1040200@zytor.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: "H. Peter Anvin" , KOSAKI Motohiro , Alexey Dobriyan , akpm@linux-foundation.org, viro@zeniv.linux.org.uk, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org To: Ulrich Drepper Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org (4/4/12 4:51 AM), Ulrich Drepper wrote: > On Mon, Apr 2, 2012 at 19:56, H. Peter Anvin wrote: >> >> You can deal with this in one of two ways: >> >> 2. Fix your malloc(). >> 1. Use the low level open()/getdents()/close() functions instead of >> opendir()/readdir()/closedir(). > > And if their is concern about using opendir() then we can add > something to posix_spawn. And attribute like POSIX_SPAWN_CLOSEALL and > you then would have to explicitly add dup and open requests for the > descriptors you want to have open. As far as I understand, any major open source project don't use posix_spawn(). Please remind, I'm talking about real world issue.