Browse Source

Trying out signals

Sebastian Vendt 4 years ago
parent
commit
718a1f9d99
1 changed files with 8 additions and 0 deletions
  1. 8 0
      libA.c

+ 8 - 0
libA.c

@@ -40,6 +40,14 @@ int main(void)
 
         i++;
     }
+	
+	//this belongs all to the new feature of the app 
+	signal(SIGINT, sighandler);
+
+   while(1) {
+      printf("Going to sleep for a second...\n");
+      sleep(1); 
+   }
 
     sleep(5);
     return 0;