Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
You need to prevent someone from debugging a Unix binary.
Single-stepping through code in a Unix environment causes a SIGTRAP to be sent to the process. The debugger captures this signal and allows the user to examine the state of the process before continuing execution. By installing a SIGTRAP handler and sending itself a SIGTRAP, the process can determine whether it is being debugged.