Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QProcess::start: Process is already running
Forum Updated to NodeBB v4.3 + New Features

QProcess::start: Process is already running

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 3 Posters 5.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Rashmi
    wrote on last edited by
    #1

    Hi,

    I am using qprocess in my application.
    while start qprocess,I got warning QProcess::start: Process is already running.

    Regards,
    Rashmi

    1 Reply Last reply
    0
    • RatzzR Offline
      RatzzR Offline
      Ratzz
      wrote on last edited by
      #2

      @Rashmi
      Can you show me what have you tried?

      --Alles ist gut.

      1 Reply Last reply
      1
      • R Offline
        R Offline
        Rashmi
        wrote on last edited by
        #3

        QString program = "/home/cosense/test1.sh";
        m_myprocess = new QProcess();
        qDebug() << m_myprocess->state() ;
        m_myprocess->start(program);
        qDebug() << "state"<< m_myprocess->state() ;

        My observations are before start qprocess , state was running by checking state code using qdeug.

        1 Reply Last reply
        0
        • mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          what is inside test1.sh?
          If it never finishes/exits it will run for ever.

          1 Reply Last reply
          2
          • R Offline
            R Offline
            Rashmi
            wrote on last edited by
            #5

            #!/bin/sh

            ls -tr /home/cosense/database/Clinical_data > /home/cosense/sorted1.txt
            echo "me"
            echo "done"

            Here, script sort the files from folder and write into text file.
            I ran script seperately.It works fine.It doesnt run forever

            mrjjM 1 Reply Last reply
            0
            • R Rashmi

              #!/bin/sh

              ls -tr /home/cosense/database/Clinical_data > /home/cosense/sorted1.txt
              echo "me"
              echo "done"

              Here, script sort the files from folder and write into text file.
              I ran script seperately.It works fine.It doesnt run forever

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @Rashmi
              Ok seems fine.
              You can use
              http://doc.qt.io/qt-5/qprocess.html#waitForFinished

              to be sure its finished before calling state() ;

              1 Reply Last reply
              2

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved