From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 17 11:53:23 2013 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id ED8531A2 for ; Thu, 17 Oct 2013 11:53:23 +0000 (UTC) (envelope-from bright@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id C78DC28EE for ; Thu, 17 Oct 2013 11:53:23 +0000 (UTC) Received: from Alfreds-MacBook-Pro-9.local (c-76-21-10-192.hsd1.ca.comcast.net [76.21.10.192]) by elvis.mu.org (Postfix) with ESMTPSA id 037B61A3C19 for ; Thu, 17 Oct 2013 04:53:22 -0700 (PDT) Message-ID: <525FCFB7.2020703@mu.org> Date: Thu, 17 Oct 2013 04:53:27 -0700 From: Alfred Perlstein User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Subject: Re: Global variables in system programs References: <525D5A35.4040005@embedded-brains.de> <525FA92E.40506@embedded-brains.de> In-Reply-To: <525FA92E.40506@embedded-brains.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Oct 2013 11:53:24 -0000 On 10/17/13 2:09 AM, Sebastian Huber wrote: > On 2013-10-17 03:45, Eitan Adler wrote: >> On Tue, Oct 15, 2013 at 11:07 AM, Sebastian Huber >> wrote: >> >>> These programs use some global variables. In a statically linked >>> context we >>> have now the following problems >> >> This is a pretty awesome idea. I've seen some work like this but it >> would be great to get FreeBSD into a state where this is easy. > > If it is acceptable for the FreeBSD project to turn e.g. ROUTE(8) and > IFCONFIG(8) into library functions then this would be great. I can do > the work. > This looks really great. Please cc or send me direct mail as you progress. I would like to help see this make it into FreeBSD. I think one other place to continue this discussion is also "arch@freebsd.org". > As noted in a different mail, currently no resource clean up is > performed. Adding such code will make the program more complex. [[ removed use of setjmp to wrap exit() ]] hmm, I see, I'm not sure there's a way around this without extensively changing/refactoring the programs so it should be OK. At a certain point we will have to track and find leaked fds and memory too. Any ideas? > >> > > I use this Git repository, but currently I work with the FreeBSD 8.2 > branch. The network stack port is a long running stuff for us. The > goal is to first get the existing work unit tested and then move to > the latest FreeBSD release. > Is it on github? Thank you, -- Alfred Perlstein