pthread_join() 可能导致什么信号
What signal might pthread_join() cause?
我在C++中有一个错误条件,在调用 pthread_join() 时无法轻松重现一些信号,我不知道是哪一个,但我的信号处理程序被调用,并且由于某种原因没有打印出生成的信号的正常调试信息。我确实得到了一个堆栈跟踪,显示:
# 2 /lib/tls/libpthread.so.0: pthread_join(...) +0x1c [0xce439c]
我查看了 pthread_join() 的手册页,没有看到任何信号的提及。
可能产生的信号是什么,原因可能是什么? 这可能是某种竞争条件。
> http://linux.die.net/man/7/pthreads :
Signals are used in implementation internally
http://osr600doc.sco.com/man/html.PTHREAD/pthread_join.PTHREAD.html :
The wait in pthread_join is not broken by a signal.
If a thread waiting in pthread_join receives a signal that is not masked,
it will execute the signal handler, and then return to waiting in pthread_join.
Note that this behavior differs from that of pthread_cond_wait.
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=%2Fapis%2Fusers_25.htm :
Threadsafe: Yes
Signal Safe: No
基本上,您可能会遇到pthread_join()由于某些错误或外部事件而接受其他信号的事实。
我们无法猜测究竟是什么导致了信号。
附言没有指定确切的环境,这使得决策更加困难。
相关文章:
- 没有信号处理程序的POSIX定时器的目的是什么?
- 当再次触发信号时,从Qt插槽执行的功能被第二次调用时会发生什么?
- 我应该使用什么信号来终止/终止Windows上的应用程序
- 使用信号检测子进程何时终止的最佳方法是什么?
- 当我们关闭QT中的窗口时,发出的信号是什么
- 对于属性上的 NOTIFY 信号,如果我给它一个参数有什么区别?
- 括号内括号内的含义是什么,以获得增强信号
- 什么时候会有QNetworkReply::error信号后跟一个finish()信号
- 信号和插槽的效用是什么
- netbeans C++调试中的信号是什么
- 在发出等待条件变量的信号后,线程何时获取锁?是什么决定了它
- 如果我们不等待就发出信号量会发生什么
- pthread_join() 可能导致什么信号
- Qt udp套接字,什么会触发套接字的readyRead信号?
- 当接收器繁忙时,Qt信号会发生什么
- 问:如果你发送信号太快会发生什么
- 什么是通过外部信号停止 std::thread 的有效方法
- 在更改Gtk::Entry的文本之前,我应该捕捉什么信号来获取它
- QListView在即将隐藏时发送什么信号
- Valgrind挂.如何查看是什么信号量引起的