Difference between a bus error and a segmentation fault? Can it happen that a program gives a seg fault and stops for the first time and for the second time it may give a bu
I assume you're talking about the SIGSEGV
and SIGBUS
signals defined by Posix.
SIGSEGV
occurs when the program references an invalid address. SIGBUS
is an implementation-defined hardware fault. The default action for these two signals is to terminate the program.
The program can catch these signals, and even ignore them.