Results 1 to 4 of 4

Thread: QProcess

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2006
    Posts
    10
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Unhappy QProcess

    Hi ALL,

    I need to lauch a process remotely.For this ,Should i go about like this.

    Qt Code:
    1. system("rsh -n remotehost");
    2.  
    3. if(USE_64BIT)
    4. {
    5. qDebug()<<"64bit==on";
    6. list = (QStringList()<<"--config-file"<<configFile<<"--config-wizard"<<"TRUE"<<"--use-64bit");
    7. qDebug()<< list;
    8. }
    9.  
    10. else
    11. {
    12. qDebug()<<"64bit not on";
    13. list = (QStringList()<<"--config-file"<<configFile<<"--config-wizard"<<"TRUE"<<);
    14. }
    15.  
    16. proc = new QProcess(this);
    17. proc->setReadChannel(QProcess::StandardError);
    18. proc->start(home,list,QIODevice::ReadOnly);
    To copy to clipboard, switch view to plain text mode 
    am I doing wrong any where . Please help me.

    regards,
    Last edited by jpn; 31st March 2008 at 06:24. Reason: missing [code] tags

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QProcess

    What is the contents of "home"?

  3. #3
    Join Date
    Apr 2006
    Posts
    10
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: QProcess

    Hi,

    contents of home is a TOOl

    like this
    Qt Code:
    1. strcpy(home, getenv("SYPHOME"));
    2. strcat(home, "/bin/sypTool");
    To copy to clipboard, switch view to plain text mode 
    when iam connecting to remote system like this

    Qt Code:
    1. system("rsh -n remotehost");
    To copy to clipboard, switch view to plain text mode 

    it is not working.

    should i go about opening a shell from the QProcess connect to remote from this .

    regards,
    basha.
    Last edited by jpn; 31st March 2008 at 14:55. Reason: missing [code] tags

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QProcess

    But system() is blocking... It won't work that way. You have to call rsh from within QProcess and pass it arguments through the command line or its standard input stream.

Similar Threads

  1. QProcess and Pipes
    By KaptainKarl in forum Qt Programming
    Replies: 1
    Last Post: 9th April 2007, 23:11
  2. QProcess extremely slow on Windows?
    By Pepe in forum Qt Programming
    Replies: 2
    Last Post: 26th March 2007, 00:25
  3. Replies: 1
    Last Post: 6th March 2007, 15:27
  4. problem with qprocess
    By deekayt in forum Qt Programming
    Replies: 2
    Last Post: 13th June 2006, 13:30
  5. QProcess in a QThread
    By chombium in forum Qt Programming
    Replies: 2
    Last Post: 11th January 2006, 15:52

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.