/* gcc -o worker worker.c OR make */ /* CS540 assgn 1 */ /* Martian (Adam Smyth) */ /* martian@midgard.org */ /* I never comment my code. (It's bad for job security. ;;) */ #include #include main(int argc, char *args[]) { int a, b, c; printf("%s %d: ", args[0], getpid()); if(argc != 3) { printf("Incorrect number of arguments.\n"); abort(); } a = atoi(args[1]); b = atoi(args[2]); c = a + b; printf("%d + %d = %d\n", a, b, c); exit(c); }