James,

On Aug 31, 2009, at 9:28 PM, James McIlree wrote:

This will not work correctly in Leopard (10.5), I made some changes in SnowLeopard (10.6) so
that -x evaltime=exec does do the right thing (tm).

I switched to Snow Leopard to get it to work right. It seems to work.

We did a hideous hack workaround where we monitored exec-success to see new processes launching,
and to decide if we wanted to stop() them.

So stop is not necessary then? This is how I do it at the moment...

proc:::exec-success
/execname == progname/
{
  stop();
  system("dtrace %s -p %d %s\n", opts, pid, scripts);
  exit(0);
}

then, in another script

BEGIN
{
  system("kill -CONT %d &\n", $target);
}

syscall::getpid:entry
/ should_make_process_wait[pid] == 1 /
{
        should_make_process_wait[pid] = 0;
        printf("Stopping %s (%d)\n", execname, pid);
        stop();
}

Is this how you suggest I should be doing it?

The final evilness is that stop() is implemented via sending a SIGSTOP, which is user visible.

I certainly do notice this.

        Thanks, Joel

---
fastest mac firefox!
http://wagerlabs.com




_______________________________________________
dtrace-discuss mailing list
[email protected]

Reply via email to