1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
#include <stdio.h> #include <unistd.h> #include <string.h> void call_me() { sleep(1); } int main (int argc, char **argv) { printf ("Hello there!\n"); // Set break point at this line. if (argc == 2 && strcmp(argv[1], "keep_waiting") == 0) while (1) { call_me(); } return 0; }