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. Using pthread and message queue with QProcess : problem

Using pthread and message queue with QProcess : problem

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 1.4k Views
  • 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.
  • D Offline
    D Offline
    Dcqt
    wrote on 27 Apr 2013, 15:19 last edited by
    #1

    this is just the outline of my problem .

    please can somebody provide some solution.
    @
    int main()
    {
    Mainwindow w;
    }

    Mainwindow :: Mainwindow()
    {
    call_actions();

    }

    call_actions()
    {
    QProcess *newproc1 = QProcess;

    pthread_create(tid,NULL,wait_for_message_from_appl,NULL);
    }
    int msgid;
    int key = 0x1234;

    void * wait_for_message_from_appl ( void *)
    {

    msgget(msgid);
    msgrcv(msgid,msg);
    if (msg == appl1)
    launch(app1);
    }

    launch(app1)
    {
    QProcess *newproc2 = QProcess;

         msgrcv(msgid); // this is failing saying Interrupted system call
    

    wait_for_exit();// this will come from newproc2 , i will send msg

    }@


    interface_file.c (newproc1 process)
    @
    msgid = msgget(0x1234);
    msgsnd(app1); -- will go to wait_for_message_from_appl@

    applicaion_file.c (newproc2process)
    @ if(exit)
    msgid = msgget(0x1234);
    msgsnd(msgid,"exit");//----- this shoud go to newproc2@

    the second time i use msgrcv ( in newproc2) i am getting msg saying "Interrupted system call".

    what is problem.

    please suggest me some other way by which i can achieve the same (my design skills are really poor)

    1 Reply Last reply
    0

    1/1

    27 Apr 2013, 15:19

    • Login

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