From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 6 09:26:11 2014 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8B7A4323 for ; Thu, 6 Nov 2014 09:26:11 +0000 (UTC) Received: from mail-wi0-x231.google.com (mail-wi0-x231.google.com [IPv6:2a00:1450:400c:c05::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 114A7F2E for ; Thu, 6 Nov 2014 09:26:11 +0000 (UTC) Received: by mail-wi0-f177.google.com with SMTP id ex7so839574wid.16 for ; Thu, 06 Nov 2014 01:26:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=7aYUYy7FY6MOtnb1j+xBYZkg+/722C/qRMEAnOs4ip0=; b=xNgurINFhQF60pAUdVKKY+U99ee+De1mTSAQGf8ajkIa6xYmKNCiYghs0vc6bOw4/V cD1r3K0m4s0EUZ1XrdSi7Gpc0rwnppN5xFztygbpswU4M/8BYBLi2W0UJKnXmP71el8x WDuKY1JNFNtB6CxCZ8Vrm6Yyfh7IqYRn6rQzrhgaWv25XlOorQ4OHIYvJHoJhYfOxq0n pZbHVreWZCO9J+d31Xhn5pNkmt8Tn8nxmQFZiAiHWmUKm4loIbM2qVNXKdFGKayZbTjf rTJEZfZNoOX6FjAAkfUgE9TnFcnhdvDEgCaFZ54M+xpo95V/njt5PjNMkXYLXmgG1f1+ 77LA== X-Received: by 10.194.239.164 with SMTP id vt4mr1522109wjc.131.1415265969379; Thu, 06 Nov 2014 01:26:09 -0800 (PST) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPSA id fq1sm18764984wib.12.2014.11.06.01.26.07 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 06 Nov 2014 01:26:08 -0800 (PST) Date: Thu, 6 Nov 2014 10:26:05 +0100 From: Mateusz Guzik To: Konstantin Belousov Subject: Re: [PATCH] Finish the task 'sysctl reporting current working directory' Message-ID: <20141106092605.GD12284@dft-labs.eu> Mail-Followup-To: Mateusz Guzik , Konstantin Belousov , Tiwei Bie , freebsd-hackers@freebsd.org References: <1414987325-23280-1-git-send-email-btw@mail.ustc.edu.cn> <20141103051908.GC29497@dft-labs.eu> <20141103064052.GA1739@freebsd> <20141103080526.GE29497@dft-labs.eu> <20141103085235.GA85851@freebsd> <20141106081330.GA12284@dft-labs.eu> <20141106085750.GA52132@freebsd> <20141106092134.GL53947@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20141106092134.GL53947@kib.kiev.ua> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-hackers@freebsd.org, Tiwei Bie X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Nov 2014 09:26:11 -0000 On Thu, Nov 06, 2014 at 11:21:34AM +0200, Konstantin Belousov wrote: > On Thu, Nov 06, 2014 at 04:57:50PM +0800, Tiwei Bie wrote: > > On Thu, Nov 06, 2014 at 09:13:31AM +0100, Mateusz Guzik wrote: > > > On Mon, Nov 03, 2014 at 04:52:35PM +0800, Tiwei Bie wrote: > > > > > > kernel changes got in in r274167 > > > > > > Please submit tmux patch to bugzilla. > > > > > > > Thanks! I have submitted the tmux patch to bugzilla [1]. > > > > [1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194858 > > This is incorrect way to use kern_proc_cwd. You should try the new > sysctl, and on ENOENT fall back to the kern_proc_file. Expecting > that the binary is run on the same machine where it was build is > wrong. > Fair point. Please keep kern_proc_cwd ifdefed and have a static var so that initial failure is remembered and the code knows not to execute it again. -- Mateusz Guzik