This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
user:kkrauss1:portfolio:signal_tester_1 [2011/12/12 21:30] – [Systems programming] kkrauss1 | user:kkrauss1:portfolio:signal_tester_1 [2011/12/12 21:34] (current) – [Project: Signal tester # 1] kkrauss1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ======Project: | ||
+ | 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. | ||
+ | |||
+ | =====Objectives===== | ||
+ | The purpose of this project was to create a program to play with signals | ||
+ | |||
+ | |||
+ | =====Background===== | ||
+ | |||
+ | 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. | ||
+ | |||
+ | =====Attributes===== | ||
+ | |||
+ | ====Cprog attributes==== | ||
+ | |||
+ | * variables | ||
+ | * pointers | ||
+ | * i/o | ||
+ | * functions | ||
+ | * arrays | ||
+ | |||
+ | ====Systems programming==== | ||
+ | * Signals | ||
+ | |||
+ | =====Code===== | ||
+ | This is the code: | ||
+ | <code c> | ||
+ | #include < | ||
+ | #include < | ||
+ | |||
+ | void intu(); | ||
+ | void seg(); | ||
+ | void recurse(); | ||
+ | |||
+ | int main() | ||
+ | { | ||
+ | char *array; | ||
+ | signal(SIGINT, | ||
+ | signal(SIGSEGV, | ||
+ | getchar(); | ||
+ | printf(" | ||
+ | return 0; | ||
+ | } | ||
+ | |||
+ | void intu() | ||
+ | { | ||
+ | printf(" | ||
+ | } | ||
+ | |||
+ | void seg() | ||
+ | { | ||
+ | printf(" | ||
+ | |||
+ | } | ||
+ | void recurse() | ||
+ | { | ||
+ | recurse(); | ||
+ | |||
+ | </ |