Hi,
I was trying out QProcess to send console commands and get what it returns. I tried to send a valid rsh command with an invalid address to see if QProcess returns me any error msg but it doesn't... not sure what i have done wrong. Below are the code i test with...modified from the qt qprocess example.
Qt Code:
#include <QProcess> #include <iostream> #include <QtCore> using namespace std; int main(){ gzip->start("rsh -l usr 192.168.20.1 rcp /home/usr/0.txt usr2@192.168.20.2:/home/usr2/rsh/"); if (!gzip->waitForStarted()) return false; gzip->closeWriteChannel(); if (!gzip->waitForFinished()) return false; if(gzip) delete gzip; }To copy to clipboard, switch view to plain text mode
thanks
Bookmarks