From owner-freebsd-threads@FreeBSD.ORG Tue Jun 3 11:10:09 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 2E9AB37B401 for ; Tue, 3 Jun 2003 11:10:09 -0700 (PDT) Received: from mail.tcoip.com.br (erato.tco.net.br [200.220.254.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 09CB643F75 for ; Tue, 3 Jun 2003 11:10:06 -0700 (PDT) (envelope-from dcs@tcoip.com.br) Received: from tcoip.com.br ([10.0.2.6]) by mail.tcoip.com.br (8.11.6/8.11.6) with ESMTP id h53I9ol08294; Tue, 3 Jun 2003 15:09:50 -0300 Message-ID: <3EDCE46E.3040109@tcoip.com.br> Date: Tue, 03 Jun 2003 15:09:50 -0300 From: "Daniel C. Sobral" User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4a) Gecko/20030416 X-Accept-Language: en-us, en, pt-br, ja MIME-Version: 1.0 To: Daniel Eischen References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: threads@freebsd.org Subject: Re: [Fwd: libc_r, libthr & konsole news] 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, 03 Jun 2003 18:10:09 -0000 Daniel Eischen wrote: > On Tue, 3 Jun 2003, Daniel C. Sobral wrote: > > >>I'm at loss at how dup2() works, exactly. It seems that libc_r overrides >>it, but libthr doesn't. But I don't understand the process well, because >>I'm don't understand the syscall glue. > > > Can you test libkse as well? I know that dup2 is not overridden in > libkse either. I saw the problem with libkse earlier. I haven't tested again, but it looked the same as libthr. Basically, dup2() fails, for reasons unknown (and ak03, for one, thinks the bug is libc_r's) with libc_r, causing it not to call konsole_grantpty. When that happens, ttyname() called later works. With libthr, the dup2() doesn't fail, konsole_grantpty gets called, and ttyname() fails. This happens only one time for each pty/tty. -- Daniel C. Sobral (8-DCS) Gerencia de Operacoes Divisao de Comunicacao de Dados Coordenacao de Seguranca VIVO Centro Oeste Norte Fones: 55-61-313-7654/Cel: 55-61-9618-0904 E-mail: Daniel.Capo@tco.net.br Daniel.Sobral@tcoip.com.br dcs@tcoip.com.br Outros: dcs@newsguy.com dcs@freebsd.org capo@notorious.bsdconspiracy.net "I like being single. I'm always there when I need me." -- Art Leo