Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753680Ab1FBNDM (ORCPT ); Thu, 2 Jun 2011 09:03:12 -0400 Received: from mail-pw0-f46.google.com ([209.85.160.46]:63647 "EHLO mail-pw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751992Ab1FBNDL (ORCPT ); Thu, 2 Jun 2011 09:03:11 -0400 MIME-Version: 1.0 In-Reply-To: <20110602134338.0c56160e@lxorguk.ukuu.org.uk> References: <1306930476-1899-1-git-send-email-lucas.demarchi@profusion.mobi> <20110602134338.0c56160e@lxorguk.ukuu.org.uk> From: Lucas De Marchi Date: Thu, 2 Jun 2011 10:02:50 -0300 Message-ID: Subject: Re: [PATCH] sysctl: add support for poll() To: Alan Cox Cc: Kay Sievers , "Eric W. Biederman" , linux-kernel@vger.kernel.org, Nick Piggin , Al Viro , Christoph Hellwig , Stephen Rothwell , Andrew Morton , David Howells , "Serge E. Hallyn" , Daniel Lezcano , Jiri Slaby , Greg Kroah-Hartman , James Morris Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1513 Lines: 37 On Thu, Jun 2, 2011 at 9:43 AM, Alan Cox wrote: >> The alternative is to have a process constantly polling and reading >> the file, which is nothing we even want to think about in 2011. > > Or to manage it properly. What if the user decides do invoke sethostname syscall "by hand"? Hostname would change beneath any other process that is trying to manage it properly. What this patch does is to notify that process that something happened. >> It's just another special case to bring us out of the UNIX stone age >> of doing things. :) > > Unfortunately not. It's a misguided attempt to follow stone age Unix 'one > short name' policy. Forget utsname node names, they are a historical > quirk of UUCP and friends and on many OS platforms will be limited to 15 > chars ! > > As to poll in general I can see some of the other proc files being > more relevant, eg for process monitoring tools being able to poll > in /proc/ and some of the proc/sys and sysctl data that does change > meaningfully. Utsname however is not one of those things. > With this patch in, if anyone wants to manage a file under /proc/sys there's really a small amount of code to write. He only has to define the new poll struct for that file. Lucas De Marchi -- 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/