[SOLVED] Re: libthr and daemon()

Matthew Fleming matthew.fleming at isilon.com
Wed Oct 7 20:50:21 UTC 2009


> 2) why would fork resolve to the one in libc (presumably, I'm not sure
how
> to prove this) instead of the one in libthr?

Well, I'm not sure how the application plus libraries linked, but there
was no explicit -lthr or -lpthread in the Makefile.  So the resulting
binary used the fork() in libc.  When I added -lthr the app grew by
about 15 bytes, and correctly used the fork() weak-referenced to the
explicit _fork() in libthr.

Weird.

Thanks,
matthew


More information about the freebsd-stable mailing list