@@ -76,7 +76,11 @@ init (void)
7676 /* Determine whether this process is supposed to be traced and if
7777 yes, whether we should print into a file. */
7878 const char * which_process = getenv ("SOTRUSS_WHICH" );
79- pid_t pid = getpid ();
79+
80+ // Dennis Edit
81+ pid_t pid = 0 ;
82+ // pid_t pid = getpid ();
83+
8084 int out_fd = -1 ;
8185 if (match_pid (pid , which_process ))
8286 {
@@ -253,7 +257,10 @@ print_enter (uintptr_t *refcook, uintptr_t *defcook, const char *symname,
253257 char buf [3 * sizeof (pid_t ) + 3 ];
254258 buf [0 ] = '\0' ;
255259 if (print_pid )
256- snprintf (buf , sizeof (buf ), "%5ld: " , (long int ) getpid ());
260+
261+ // Dennis Edit
262+ snprintf (buf , sizeof (buf ), "%5ld: " , (long int ) 0 );
263+ // snprintf (buf, sizeof (buf), "%5ld: ", (long int) getpid ());
257264
258265 fprintf (out_file , "%s%15s -> %-15s:%s%s(0x%lx, 0x%lx, 0x%lx)\n" ,
259266 buf , (char * ) * refcook , (char * ) * defcook ,
@@ -340,7 +347,10 @@ print_exit (uintptr_t *refcook, uintptr_t *defcook, const char *symname,
340347 char buf [3 * sizeof (pid_t ) + 3 ];
341348 buf [0 ] = '\0' ;
342349 if (print_pid )
343- snprintf (buf , sizeof (buf ), "%5ld: " , (long int ) getpid ());
350+
351+ // Dennis Edit
352+ snprintf (buf , sizeof (buf ), "%5ld: " , (long int ) 0 );
353+ // snprintf (buf, sizeof (buf), "%5ld: ", (long int) getpid ());
344354
345355 fprintf (out_file , "%s%15s -> %-15s:%s%s - 0x%lx\n" ,
346356 buf , (char * ) * refcook , (char * ) * defcook , " " , symname , reg );
0 commit comments