Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Dec 2008 15:14:56 +0100
From:      Laszlo Nagy <gandalf@shopzeus.com>
To:        freebsd-questions@freebsd.org
Subject:   "truss" is buggy?
Message-ID:  <494FA0E0.1060108@shopzeus.com>

next in thread | raw e-mail | index | archive | help
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 <stdio.h>

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





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?494FA0E0.1060108>