As per man 2 signal, the type of a signal handler is as follows:
This means that a signal handler has to be a function that returns void, and it needs to take an int parameter.
For example, we can write a signal handler as follows:
Obviously, this signal handler is rather useless, but it illustrates the basics of a signal handler.