A project for C/C++, Data Structures, and System Programming by Karl Krauss for fall 2011.
This did not take long at all, it was just my attempt at playing with signals.
The purpose of this project was to create a program to play with signals
I had never played with signals before, Matt lectured and we wrote a basic program, I wanted to continue and wrote a couple of my own.
This is the code:
#include <signal.h> #include <stdio.h> void intu(); void seg(); void recurse(); int main() { char *array; signal(SIGINT, intu); //interrupt aka ctrl c signal(SIGSEGV, seg);// good ol seg fault why is it V instead of F? getchar(); printf("%c\n", *array); return 0; } void intu() { printf("You tried to interrupt me but I won't let you!\n"); } void seg() { printf("I segmented!\n"); } void recurse() { recurse();