Science Fair Project Encyclopedia
SIGBUS
BUS_ADRERR
| non-existant physical address |
BUS_OBJERR
| object-specific hardware error |
SIGBUS is the symbolic name for the signal thrown by computer programs causing a bus error on POSIX compliant platforms. SIGBUS is a symbolic constant defined in signal.h.
Symbolic signal names are used as signal numbers can vary across platforms.
Computer programs may throw SIGBUS for improper memory handling (for further discussion, see bus error). The operating system may inform the application of the nature of the error using the signal stack , which developers can use to debug their programs or handle errors.
The default action on being sent SIGBUS is an abnormal termination, this will end the process but may generate a core file to aid debugging, or other platform dependent action.
SIGBUS can be handled (caught), that is, applications can request what action they want to occur. Examples of such action might be ignoring it, calling a function, or restoring the default action. In some circumstances, ignoring SIGBUS can result in undefined behaviour.
An example of an application that might handle SIGBUS is a debugger, which might check the signal stack and inform the developer of what happened, and where his program terminated.
SIGBUS is usually generated by the Operating System, however users with appropriate permissions can use the kill() system call, or kill command (userland program, or sometimes a shell builtin) to send the signal to a process at will.
The contents of this article is licensed from www.wikipedia.org under the GNU Free Documentation License. Click here to see the transparent copy and copyright details


