#include <signal.h>

int main(void) {
    /* signal/raise stubs */
    void (*old)(int);
    old = signal(SIGTERM, (void (*)(int))0);
    if (old != (void (*)(int))0) return 1; /* expect SIG_DFL (NULL) */

    int r = raise(SIGTERM);
    if (r != 0) return 2; /* expect success */

    return 0;
}
