[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Nbd] update: nbd-2.8.7 on Solaris 10



Wouter Verhelst writes the following:
>
>On Mon, Jan 22, 2007 at 12:20:33PM -0600, Vico Marziale wrote:
>> Adding -lsocket and -lnsl takes care of all of the symbol problems except
>> "daemon" which I still have yet to figure out.
>
>Gotta love Solaris.
>
>If you can figure out which additional libraries are needed and at least
>one symbol per needed library (say, '-lsocket' is needed for 'bind' and
>'socket'), it'd be nice if you could tell me; I'll then add some
>autoconf checks then so that they get autodetected and automatically
>added in future releases.

daemon() is a BSDism. openssh has a simple implementation you could borrow,
or use as inspiration while writing your own. It's just a short series of
system calls: fork, exit, setsid, chdir("/"), close 0 and 1 and 2, open
/dev/null 3 times.




Reply to: