Running new process from my GUI

  • Each time my GUI process fires up I want to slay and restart a few server processes which handle the interface with hardware devices (serial & ethernet).

    I used the QProcess::startDetached() function which starts the process OK but when I try to communicate with the new process using MsgSend() the call just gets blocked and never returns. If I start the processes at bootup or via Momentics, it works fine.

    Any ideas ?

  • Lifetime Qt Champion


    Please add the Qt version you are using, the OS and its version etc.

    startDetached creates a new independent process, is that really what you want ?

  • @SGaist I managed to solve the first problem. My server code had a call to name_open() after name_attach() as if it was trying to connect to itself !? Removing this has solved the issue.

    Next question - can I use the same QProcess object to start more than one process ?


    QProcess proc;


    This code only seems to start 'foo'

  • Lifetime Qt Champion

    AFAIK, it's one process at a time though you can re-use the object itself once one is finished.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.