On 09/01/11 18:13, Adam Leventhal wrote:
Hey Vladimir,

This is a bug in the way that DTrace composes arguments to the command
it executes as a result of the -c option.

http://src.illumos.org/source/xref/illumos-gate/usr/src/cmd/dtrace/dtrace.c#274

Oh, it's using strtok() with "\f\n\r\t\v " as separators.

You can see that make_argv() just tokenizes the string based on
whitespace -- it doesn't use the tokenizing logic that the shell would
use. dtrace(1M) should probably do something like libast`sfnew() of
the command string, followed by an libshell`sh_parse() and
libshell`sh_exec() -- i.e. we want dtrace -c to act like sh -c.

I've filed this bug to track the issue:

   https://www.illumos.org/issues/1440

I filed similar bug in Bugster :)

To work around this, you can probably create a shell script that
simply does an exec of the command you want to run with the arguments
you want.

Works fine, thanks.


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

Reply via email to