Finalcmd=string (" timeout 3/bin/sh -c ")
+ string (" \ "(export TERM=dumb & amp; & CD ") + lastpath
+ string (" "& amp; & ") + command
+ string (" "& amp; & Echo -n MYPWD=& amp; & The PWD) 2 & gt; & 1 ")
+ string (" | iconv - c - s - f utf-8 -t gb2312 \ "2 & gt; & 1 ");
Popen (finalcmd c_str (), "r");
When the command=echo "' {} '()' \}}, {{'
Error: proceedings of the sh: 1: Syntax error: ") "unexpected
But in the pipeline to redirect error, cannot catch this error,
Consult how to modify finalcmd?