The following program demonstrates how a process can use the raise library call to send a signal to itself.
The complete source code and Makefile is available as a zip file.