// .. handler code
// .. bind handler to SIGUSR1
pause(); // wait for SIGUSR1
// some more code
Citing from the man page for pause(2):
pause() returns only when a signal was caught and the signal-catching function returned. In this case, pause() returns -1, and errno is set to EINTR.
You can be sure that your signal handler runs before
some more code.