int main(int argc, char** argv){ loadacceptorsconf(accpath); loadlearnersconf(leapath); acceptor_init(self_of_acceptors, &acc); }
int main (int argc, char const *argv[]) { signal(SIGINT, handle_cltr_c); if (argc != 2) { printf("This program takes exactly one argument: the acceptor unique identifier\n"); exit(1); } short int acceptor_id = atoi(argv[1]); if (acceptor_init(acceptor_id) != 0) { printf("Could not start the acceptor!\n"); exit(1); } while(1) { //This thread does nothing... //But it can't terminate! sleep(1); } return 0; }