Find the answer to your Linux question:
Results 1 to 2 of 2
Hello. I detected that a program aborts if pthread_cancel is issued under certain circunstances : if the target thread is blocked in a call to select in a member function ...
  1. #1
    Just Joined!
    Join Date
    Aug 2007
    Posts
    5

    pthread_cancel/gcc bug?

    Hello.
    I detected that a program aborts if pthread_cancel is issued under certain circunstances :
    • if the target thread is blocked in a call to select in a member function with ' throw()' exception especification (throw nothing).
    • if the target thread is blocked in a call to select surrounded by a try/catch(...) block that do not rethrow.

    My question is, żis this behaivour correct?
    In pthread_cancell_examples.zip, there are two code samples and the output of g++ -v and uname -a.
    Thanks a lot .
    Attached Files Attached Files

  2. #2
    Just Joined!
    Join Date
    Aug 2007
    Posts
    5
    Quote Originally Posted by jfranzoy View Post
    Hello.
    I detected that a program aborts if pthread_cancel is issued under certain circunstances :
    • if the target thread is blocked in a call to select in a member function with ' throw()' exception especification (throw nothing).
    • if the target thread is blocked in a call to select surrounded by a try/catch(...) block that do not rethrow.

    My question is, żis this behaivour correct?
    Gcc team is aware of the problem. Link to gcc bug report is Bug 28145 - C++ (throw() and catch(...) {/* fall through */ } ) and pthread cancellation are incompatible (at least with NPTL)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...