New library: libpidfile.

Pawel Jakub Dawidek pjd at FreeBSD.org
Tue Aug 23 08:18:27 GMT 2005


On Tue, Aug 23, 2005 at 12:51:06PM +1000, Tim Robbins wrote:
+> Pawel Jakub Dawidek wrote:
+> 
+> >I'd like to commit a small library for handling "pidfiles".
+> This sounds like a good idea to me, but you might consider putting the functionality in libutil instead of creating a separate library.

If you look at the perforce logs, you'll see it was in libutil at
first.
While I like libutil for some single functions (I added
humanize_number(3) in there), but I don't like putting there
everything.

In my first concept (when it was part of libutil) I allocated memory
to store needed informations, because I didn't wanted to use preallocated
memory (someone linking libutil doesn't have to use pidfile
functionality).
Now, when it is a small library I can use preallocated memory and
eliminate one point of potential failure.
It also now has 4 functions, which makes it a good candidate of small,
nice, lightweight library:)

-- 
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd at FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20050823/c5fca22c/attachment.bin


More information about the freebsd-arch mailing list