On Sun, Oct 24, 1999 at 06:47:14PM +0200, Niels M?ller wrote:
> raf <[EMAIL PROTECTED]> writes:
>
> > now it handles the init and inetd cases.
> >
> > http://www.zip.com.au/~raf2/lib/software/daemon
>
> Thanks. Got it now. I have two questions:
>
> 1. The code is copyrighted by you, but doesn't say anything about
> copying conditions. I hope it's ok with you to distribute (parts
> of) it under the GPL?
yes. definitely. it is supposed to be distributable under the GPL
(i just haven't haven't gotten around to saying so yet).
> 2. Is it a bad idea to use a separate program (e.g. your daemon.c) to
> start lshd? I.e. I should incorporate the relevant parts directly
> into lshd?
> /Niels
it's a waste of a process. but it's a tiny one.
i'd recommend taking daemon.c and removing anything
there that depends on the other files. it's main
dependencies are lim.c (posix.1 limits) and sig.c
(signal handling) and fifo.c (for the locked pid file).
these dependencies are probably good to keep. i think
these files should compile easily on any posix system.
if there are any dependencies on prog.c (i don't think so),
they should be avoided. prog.c uses GNU getopt_long_only()
which isn't available everywhere and reduces the chance
of compiling easily. this is true for both the separate
'daemon' program and the library. i'll be including the
source to getopt_long_only() in the distribution to alleviate
this problem.
let me know if you want me to extract parts of it.
i probably should separate the 'daemon' stuff from the 'prog'
stuff. they don't really have anything to do with each other.
raf