[patch] enhance quoting for command string

Frank Ch. Eigler fche@redhat.com
Mon Aug 20 21:36:00 GMT 2007


Hi -

> [...test case...]
> Checked in. See systemtap.base/cmd_parse.exp.

Thanks, it's a good start.

> [...]
> I guess we are not talking about the same thing?  I thought when you
> objected to using system() instead of exec() you meant running the
> commands directly instead of in a shell, like system() does. 

Yes, whatever it takes to make us invulnerable to transcription errors
occurring from gluing together then parsing apart argument lists in
strings.

> [...] Internally this [exec sh -c STRING] is exactly what
> [tapset] system() does.  However we could never use [unix] system()
> because [unix] system() waits for we process to complete before
> returning.

(Sure, but we already fork(2) before exec(2).  One could conceivably
use system(3) there.)

- FChE



More information about the Systemtap mailing list