From owner-freebsd-threads@FreeBSD.ORG Mon Jun 30 20:33:52 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2CB2837B405 for ; Mon, 30 Jun 2003 20:33:52 -0700 (PDT) Received: from web80502.mail.yahoo.com (web80502.mail.yahoo.com [66.218.79.72]) by mx1.FreeBSD.org (Postfix) with SMTP id 6254843FF9 for ; Mon, 30 Jun 2003 20:33:51 -0700 (PDT) (envelope-from xiongjinshan@yahoo.com) Message-ID: <20030701033351.62612.qmail@web80502.mail.yahoo.com> Received: from [218.79.98.26] by web80502.mail.yahoo.com via HTTP; Mon, 30 Jun 2003 20:33:51 PDT Date: Mon, 30 Jun 2003 20:33:51 -0700 (PDT) From: xiong jinshan To: deischen@freebsd.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii cc: threads@freebsd.org Subject: Re: About the kse signal process X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jul 2003 03:33:52 -0000 --- Daniel Eischen wrote: > On Mon, 30 Jun 2003, xiong jinshan wrote: > > > > --- Daniel Eischen wrote: > > > On Mon, 30 Jun 2003, xiong jinshan wrote: > > > > It received the SIGSEGV before the main() when > I > > > > linked with libc_r;(. > > > > > > I think you have something screwed up somewhere. > > > How did you compile and link it? > > > > Yes, it maybe my fault. > > > > If I link libc_r with static, it works correctly. > > If I link it with dynamic, segv occurs. > > If I not linked c_r, th_func() couldn't received > the > > alarm. > > > > Why must it be linked with static mode? Does it > mean > > the native c library in release 5.1 not reentrant? > > It doesn't have to be statically linked. Are you > explicitly using -lc? (don't!) In 5.x, you link > threaded programs (if linking against libc_r) with: > > gcc -o app app.c -lc_r > > Or, using the deprecated -pthread option: > > gcc -o app -pthread app.c > > As I said, it works here for me on -current. It > doesn't > look like anything has changed in libc_r since 5.1. > It seems ok now, thank you! > -- > Dan Eischen > __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com