Date: Thu, 17 Oct 2013 06:44:53 -0700 From: Matthew Fleming <mdf@FreeBSD.org> To: Sebastian Huber <sebastian.huber@embedded-brains.de> Cc: Eitan Adler <lists@eitanadler.com>, FreeBSD Hackers <freebsd-hackers@freebsd.org> Subject: Re: Global variables in system programs Message-ID: <CAMBSHm9_Om202DuSj==ag6wt9j5TmYeVJz0W_8RCZpe-xTA6gA@mail.gmail.com> In-Reply-To: <525FA92E.40506@embedded-brains.de> References: <525D5A35.4040005@embedded-brains.de> <CAF6rxgn4bLJ1VQp-_ucoqVm9SJEmo8=sH49k7HxJO3Y9JRZcww@mail.gmail.com> <525FA92E.40506@embedded-brains.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Oct 17, 2013 at 2:09 AM, Sebastian Huber < sebastian.huber@embedded-brains.de> wrote: > On 2013-10-17 03:45, Eitan Adler wrote: > >> On Tue, Oct 15, 2013 at 11:07 AM, Sebastian Huber >> <sebastian.huber@embedded-**brains.de<sebastian.huber@embedded-brains.de>> >> 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. At a meta level, IMO *most* of the functionality in binaries should be in libraries. How many times writing a C unit test have I wanted to do rm -rf of the temporary files I created? But the recursive remove is in rm(1) not in libutil. And it sounds like the functionality in route/ifconfig is now desired to be accessed programatically, not just from a shell script. So +1 for moving code into a library where it can be re-used. Cheers, matthew
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAMBSHm9_Om202DuSj==ag6wt9j5TmYeVJz0W_8RCZpe-xTA6gA>