Results 1 to 17 of 17

Thread: QProcess : child process listening parent output ?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2007
    Posts
    158
    Thanks
    25
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QProcess : child process listening parent output ?

    I mesure it with the Windows task manager.
    The server and the client are on different machines.

    If I launch multiple connections, it doesn't take more memory (tested with 3 sequentials connections/deconnections). So, I don't think it's a memory leak, instead the 3 connections used the same memory adress... I should try to laucnh the 3 at the same time.



    PS : KO for "Kilo Octet"

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

    Default Re: QProcess : child process listening parent output ?

    Quote Originally Posted by Nyphel View Post
    The server and the client are on different machines.
    Ok, now I'm a bit lost... You want to launch an application on a remote machine using QProcess and listen to its output or are we dealing with two completely separate problems here?

  3. #3
    Join Date
    Feb 2007
    Posts
    158
    Thanks
    25
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QProcess : child process listening parent output ?

    Huhu

    My main appplication runs on the client machine.
    It want's to question the server about new incoming mails.

    In order to do that, i have made two small application.
    The first, the main, is a GUI based one : trayicon, menus, pop-ups, timers, etc.
    The second, the child, is able to communicate with the server.

    The main one launch the secnd when must know the number of incoming mails.
    The child one answer the main one with the output channel.

    I would like the main one to give orders to the child one.
    Example : re-check for mails, give me the mails senders, etc.

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

    Default Re: QProcess : child process listening parent output ?

    So does the "main" one work on the same machine as the "child"?

    If so, then I don't see why you can't pass 127.0.0.1 to the socket...

  5. #5
    Join Date
    Feb 2007
    Posts
    158
    Thanks
    25
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QProcess : child process listening parent output ?

    Yes, the two are on the client machine.
    I don't want to use Sockets to communicate with the child application, I wanted a signal/slots base communication

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

    Default Re: QProcess : child process listening parent output ?

    You can't have signals/slots - they don't work accross process boundaries! You can either use an stdin/stdout communication (through QProcess) or some kind of proper IPC mechanism like a shared memory, a pipe, message queue, socket or something simmilar.

Similar Threads

  1. initialize child widgets within parent?
    By ucomesdag in forum Newbie
    Replies: 6
    Last Post: 6th June 2006, 08:11
  2. Move child widget along with the parent widget
    By sreedhar in forum Qt Programming
    Replies: 2
    Last Post: 15th May 2006, 12:00
  3. Infinite loop - resize parent from child
    By bitChanger in forum Qt Programming
    Replies: 3
    Last Post: 5th May 2006, 13:21
  4. Referencing Parent Widget from Child
    By taylor34 in forum Qt Programming
    Replies: 8
    Last Post: 11th April 2006, 15:13
  5. QProcess / system call not working under linux. Why?
    By johnny_sparx in forum Qt Programming
    Replies: 12
    Last Post: 11th March 2006, 00:32

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.