我試圖使用SA_SIGINFO sigaction的第三個引數來直接跳轉到中斷的背景關系。
這樣想:
void action(int Sig。siginfo_t *Info, void *Uctx) {
ucontext_t *uc = Uctx; setcontext(uc);
會有和剛才一樣的效果:
void action(int Sig, siginfo_t *Info, void *Uctx) {
return;
}
但奇怪的是,它接受了三個信號(呼叫setcontext-calling處理程式),然后它就發生了隔離故障
在setcontext中:
Dump of assembler code for function setcontext:
0x00007ffff7a34180 < 0> : push %rdi
0x00007ffff7a34181 < 1>: lea 0x128(%rdi),%rsi
0x00007ffff7a34188 < 8>: xor
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/324027.html
標籤:
