[patch] enhance quoting for command string
Frank Ch. Eigler
fche@redhat.com
Thu Aug 16 06:25:00 GMT 2007
Lai Jiangshan <laijs@cn.fujitsu.com> writes:
> [...]
> When I was using systemtap to test the following command,
> I found that it didn't work as expected.
> $ stap -vv -c 'echo "Hello World"' -e "probe begin{}"
Yeah, not surprising: see bug #2424.
> [...] So I enhanced it by adding a function cmdstr_quoted() in
> util.cxx. [...]
Yes, that could be one way. staprun/stapio would have to do similar
quoting to ensure that the funny strings make it all the way through.
(There's also the tapset function system() to worry about.)
For another way, we could explore using plain old exec*(2) instead of
system(3) for invoking staprun/stapio/user-specified commands.
- FChE
More information about the Systemtap
mailing list