[Qt-interest] passing multiple args to rsh encapsulated in a QProcess

Sarvesh Saran Sarvesh.Saran at synopsys.com
Wed Aug 26 09:00:52 CEST 2009


Hi,

I am trying to invoke RSH In a QProcess and would like to pass multiple commands to RSH ( Linux OS).
The following code works:

QProcess *process = new QProcess(this);
QStringList args;
args <<"machine1"<<"ls";
process->start("rsh",args);

As you can see RSH here is passed only a single command "ls"


However this does not seem to work.

args<<"machine1"<<". /mypath/settings.sh"<<";mycommand";

process->start("rsh",args);

(on the command line the above command works fine..i.e. rsh machine1 "./mypath/settings.sh;mycommand").

I really do not want to use system call in my program because that would mean redirecting output onto a file and then reading that file..is this problem because of the peculiarities of rsh or is there something I can do to QProcess to make this work?

Thanks,
Sarvesh

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090826/12502814/attachment.html 


More information about the Qt-interest-old mailing list