Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Apr 2010 12:37:27 +0100 (BST)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Alexander Churanov <alexanderchuranov@gmail.com>
Cc:        freebsd-hackers <freebsd-hackers@freebsd.org>, Leinier Cruz Salfran <salfrancl.listas@gmail.com>
Subject:   Re: make pkg_install suite reusable, please
Message-ID:  <alpine.BSF.2.00.1004111235330.80625@fledge.watson.org>
In-Reply-To: <q2x3cb459ed1004090736t5a67f315geca1c199a5061e7d@mail.gmail.com>
References:  <x2ta2585ef1004090716vf74893dfo9d5412455294c64d@mail.gmail.com> <q2x3cb459ed1004090736t5a67f315geca1c199a5061e7d@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 9 Apr 2010, Alexander Churanov wrote:

> 2010/4/9 Leinier Cruz Salfran <salfrancl.listas@gmail.com>
>
>> i want to ask you one thing: can you make the 'pkg_install' suite reusable 
>> .. means install 'libinstall.a' as a shared object in order to make it 
>> reusable by others devs
>
> I'd like to add my 50 cents. From my point of view, the true UNIX way is 
> re-using whole programs. This provides unbelievable isolation and 
> correctness. If you don't want to fork myriads of processes each second, 
> then, it's, probably, better to ask for pipe mode of pkg_* tools. For 
> example, aspell works that way. You start a process, write commands and 
> queries and read results.

While there are clearly benefits to process isolation, there are countless 
situations in UNIX where I've said to myself "Oh, I wish I had a lib<foo> not 
just a <foo> command".  This is particularly the case for monitoring tools, 
where third-party applications have a lot of trouble parsing and tracking the 
output of tools like ps(1), etc.  This is why recently we've been working on 
libmemstat(3), libprocstat(3), libnetstat(3), etc -- so that tools can avoid 
rewriting that code as well as avoid the parsing problem.  So I have no 
particular opinion on this tool, but I will say that in general, it would be 
nice if programs were often thin wrappers around a library that could be 
reused, not just command line tools.

Robert



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1004111235330.80625>