linux - Signals interrupting the message queue primitives and system calls -


i have qt program contains :

  1. many qt signal-slot pairs, implementing socket programming.
  2. system calls doing file operations
  3. some posix message queue code, in which, process waits message written on queue, reads , processes.

i facing 2 problems :

i. sometimes, while process waiting on queue read message, value returned function mq_receive according documentation translates message interrupted system call.

ii. sometimes, while process doing file operation using system call, application crashes.

now read here how can use temp_failure_retry macro retrying failed call.

q1. can problem behind 2 issues same reason using qt signal/slot mechanism?

q2. if so, temp_failure_retry good/standard way handle such situations ? or qt provides other way out of ?

q3. qt generated signals causing issue other primitives ? , why happens message queues , system calls , not other c++ primitives ?

can post link article/book can understand how , why signals/routines/system calls might cause problems each other ? can't make out exact keywords shall googling/binging ?

try investigate this , this. maybe, makes sense use qthread instead of posix messaging, or suggested 1 of link qt local sockets. before these, read event loops in qt gui , qthreads.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -