From owner-freebsd-stable@FreeBSD.ORG Wed Oct 7 20:50:21 2009 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8B951065694 for ; Wed, 7 Oct 2009 20:50:21 +0000 (UTC) (envelope-from matthew.fleming@isilon.com) Received: from seaxch09.isilon.com (seaxch09.isilon.com [74.85.160.25]) by mx1.freebsd.org (Postfix) with ESMTP id B11A98FC16 for ; Wed, 7 Oct 2009 20:50:21 +0000 (UTC) x-mimeole: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable Date: Wed, 7 Oct 2009 13:50:26 -0700 Message-ID: <06D5F9F6F655AD4C92E28B662F7F853E0321806B@seaxch09.desktop.isilon.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [SOLVED] Re: libthr and daemon() Thread-Index: AcpGFmYgHqq4lT7VQTO38LEndzavEQAiucvw From: "Matthew Fleming" To: Subject: [SOLVED] Re: libthr and daemon() X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2009 20:50:21 -0000 > 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