From owner-freebsd-questions@FreeBSD.ORG Mon Dec 22 14:33:37 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C688E1065673 for ; Mon, 22 Dec 2008 14:33:37 +0000 (UTC) (envelope-from gandalf@shopzeus.com) Received: from shopzeus.com (135-shost.hostoffice.hu [195.228.74.135]) by mx1.freebsd.org (Postfix) with ESMTP id 893DD8FC13 for ; Mon, 22 Dec 2008 14:33:37 +0000 (UTC) (envelope-from gandalf@shopzeus.com) Received: from [192.168.1.104] (localhost [127.0.0.1]) by shopzeus.com (Postfix) with ESMTP id 3C521392435 for ; Mon, 22 Dec 2008 09:11:25 -0500 (EST) Message-ID: <494FA0E0.1060108@shopzeus.com> Date: Mon, 22 Dec 2008 15:14:56 +0100 From: Laszlo Nagy User-Agent: Thunderbird 2.0.0.18 (X11/20081125) MIME-Version: 1.0 To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: "truss" is buggy? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2008 14:33:37 -0000 Apparently, the "truss" trace tool has a bug. At least I was told that the tracer program should not change the return value of the getppid() call inside the traced process. Here is an example program: %cat test.c #include int main() { while(1) { sleep(5); printf("ppid = %d\n", getppid()); } } %gcc -o test test.c %./test ppid = 47653 ppid = 47653 ppid = 47653 # Started "truss -p 48864" here! ppid = 49073 ppid = 49073 ppid = 49073 I cannot install strace, beacuse my platform is amd64. What other options do I have? Thanks Laszlo