SIGBUS — Specification exception
SIGBUS — 规格异常
The first way is to install a signal handler for the SIGBUS signal, and then simply call return in the handler.
第一种方式是为SIGBUS信号设置信号处理程序,并在处理程序中简单的执行return语句。
Your write system call will be interrupted by the bus error signal SIGBUS, because you performed a bad memory access.
此时write系统调用会被进程接收到的SIGBUS信号中断,因为当前进程访问了非法内存地址。
应用推荐