I've not tested this but can you try  adding an escape char ( \ ) before the 
$target as well. Shell can do bad things to it. 

So something likeā€¦

dtrace -Z -n 'pid\$target::myfunc:return/arg1 == 1/ { ustack(); }' -c 
"/usr/bin/mycmd -a \"foo bar\" -b another"

-Angelo


On Sep 1, 2011, at 9:00 AM, Vladimir Kotal wrote:

> 
> Hi all,
> 
> Sorry for a beginner's question but I can't find the answer anywhere and do 
> not have time to investigate so I decided to exploit this forum. Is there a 
> way how to instrument a command which has arguments containing whitespace 
> with PID provider ?
> 
> I am doing something like this:
> 
> dtrace -Z -n 'pid$target::myfunc:return/arg1 == 1/ { ustack(); }' -c 
> "/usr/bin/mycmd -a \"foo bar\" -b another"
> 
> but everything I tried lead to usage printed by the command or dtrace(1) for 
> one reason or another.
> 
> Thanks for the answers,
> 
> 
> v.
> _______________________________________________
> dtrace-discuss mailing list
> dtrace-discuss@opensolaris.org

_______________________________________________
dtrace-discuss mailing list
dtrace-discuss@opensolaris.org

Reply via email to