Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762043AbXEaT7w (ORCPT ); Thu, 31 May 2007 15:59:52 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1761857AbXEaT7o (ORCPT ); Thu, 31 May 2007 15:59:44 -0400 Received: from smtp1.linux-foundation.org ([207.189.120.13]:41189 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761561AbXEaT7m (ORCPT ); Thu, 31 May 2007 15:59:42 -0400 Date: Thu, 31 May 2007 12:59:16 -0700 (PDT) From: Linus Torvalds To: Davide Libenzi cc: Jakub Jelinek , Ulrich Drepper , Linux Kernel Mailing List , Andrew Morton , Ingo Molnar Subject: Re: [PATCH] Introduce O_CLOEXEC (take >2) In-Reply-To: Message-ID: References: <200705311809.l4VI9F9X009556@devserv.devel.redhat.com> <465F170B.3070603@redhat.com> <20070531190235.GY4033@devserv.devel.redhat.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1114 Lines: 28 On Thu, 31 May 2007, Davide Libenzi wrote: > > What I meant, was that the vast majority of MT+exec apps wants all their > fds (but an handfull, maybe) to be O_CLOEXEC. So a global, > non-inheritable, per-process flag seemed the most straightforward > solution. I'm with Uli on this one. "Stateful" stuff is bad. It's essentially impossible to handle with libraries - either the library would have to explciitly always turn the state the way _it_ needs it, or the library will do the wrogn thing. For example, what about libraries that are used to set up stdin/stdout for the forker? This is not unlike floating point rounding. Having stateful rounding (like the i387) is *stupid*. You want per-operation rounding (where *one* of the choices may be "use default"). Exactly because libraries etc will need to control their _own_ internal choices. Linus - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/