[Qt-interest] passing multiple args to rsh encapsulated in a QProcess
Thiago Macieira
thiago.macieira at trolltech.com
Wed Aug 26 14:54:54 CEST 2009
Em Quarta-feira 26 Agosto 2009, às 14:02:02, Sarvesh Saran escreveu:
> char *buf = "rsh machine1 \"source /remote/bin/settings.csh\";qhost"
>
> fprintf(stderr,"%d\n",system(buf));
You have two processes above.
You're running:
rsh machine1 "source /remote/bin/settings.csh"
qhost
You need two QProcess for that.
Or you can do:
QProcess proc.
QStringList args;
args << "-c" << "rsh machine1 \"source /remote/bin/settings.csh\";qhost";
proc.start("/bin/sh", args);
--
Thiago Macieira - thiago.macieira (AT) nokia.com
Senior Product Manager - Nokia, Qt Development Frameworks
Sandakerveien 116, NO-0402 Oslo, Norway
Qt Developer Days 2009 | Registration Now Open!
Munich, Germany: Oct 12 - 14 San Francisco, California: Nov 2 - 4
http://qt.nokia.com/qtdevdays2009
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090826/f3739fc3/attachment.bin
More information about the Qt-interest-old
mailing list