disclaimer: I am a dtrace beginner.
A common convention in Umix is that a process rereads its
configuration files when sent
a SIGHUP signal. So I thought smart to write a dtrace script (shown
below) that prints the files opened
by a process that receive any signal.  I starts the said script, next
I do a "sudo killall -1 httpd" and I get nothing except  lines like :

trace: error on enabled probe ID 2 (ID 17602: syscall::open:entry):
invalid user access in predicate at DIF offset 4
dtrace: error on enabled probe ID 3 (ID 17603: syscall::open:return):
invalid user access in predicate at DIF offset 4

I am using leopard.
What am I doing wrong?

#! /usr/sbin/dtrace -s

proc::postsig:signal-handle  {
  this->pid = pid;
  printf("%s with pid %d got a signal %d\n", execname, pid, arg0);
}
syscall::open:entry /this->pid == pid/ {   this->file = copyinstr(arg0);  }
syscall::open:return /this->pid == pid/ {   printf( "%s  %s %d\n",
execname,  this->file, arg0); }



-- 
cognominal stef
_______________________________________________
dtrace-discuss mailing list
[email protected]

Reply via email to