So, I've used signal() function several times so far, although I haven't been aware of what, actually, declaration of this function looks like. I found out that this function returns pointer to a function:
void (*signal(int sig, void (*func)(int)))(int)
And this pointer points to previous signal handler. OK, but what is this for? Does anybody use this returned pointer? Can you describe an example where this returned value is useful?