shithub: scc

ref: 65014a8ce3a1b7d2b18c97bca389d17d83faff57
dir: /tests/libc/execute/0001-abort.c/

View raw version

#include <stdio.h>
#include <signal.h>
#include <stdlib.h>

sig_atomic_t v;

void
handler(int dummy)
{
	v = 1;
}

int
main(void)
{
	signal(SIGABRT, handler);
	abort();

	if (v == 1)
		printf("ok\n");

	return 1;
}