"truss" is buggy?

Laszlo Nagy gandalf at shopzeus.com
Mon Dec 22 14:33:37 UTC 2008


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




More information about the freebsd-questions mailing list