This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] enhance quoting for command string


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]