This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [patch] enhance quoting for command string
- From: fche at redhat dot com (Frank Ch. Eigler)
- To: Lai Jiangshan <laijs at cn dot fujitsu dot com>
- Cc: systemtap at sourceware dot org
- Date: Wed, 15 Aug 2007 21:45:08 -0400
- Subject: Re: [patch] enhance quoting for command string
- References: <46C3A0C9.6000805@cn.fujitsu.com>
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