The system() action is printf()-like, so you could do something like this:
proc:::exec-success
/ execname == "firefox-bin" /
{
stop();
system("%s -p %d", $1, pid);
}
and pass in the name of the 2nd script as the first argument.
Chad
On Fri, Aug 28, 2009 at 3:54 PM, Joel Reymont<[email protected]> wrote:
> Thanks Chad!
>
> How do I pass the 2nd script as argument into the first, though?
>
> Thanks, Joel
>
> On Aug 28, 2009, at 8:52 PM, Chad Mynhier wrote:
>
>> You can do this with two separate DTrace invocations. The first
>> catches the exec of firefox-bin and fires off the second. Something
>> like this for the first one:
>>
>> proc:::exec-success
>> / execname == "firefox-bin" /
>> {
>> stop();
>> system("/tmp/trace-firefox.d -p %d", pid);
>> }
>
> ---
> fastest mac firefox!
> http://wagerlabs.com
>
>
>
>
>
_______________________________________________
dtrace-discuss mailing list
[email protected]