linux - Signals interrupting the message queue primitives and system calls -
i have qt program contains :
- many qt signal-slot pairs, implementing socket programming.
- system calls doing file operations
- 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
Post a Comment