skip to Main Content

Docker custom program stop

Look at this c program: #include <stdio.h> #include <unistd.h> #include <signal.h> int stop = 0; void handle_signal(int sig) { stop = 1; } void main() { signal(SIGINT, handle_signal); signal(SIGTERM, handle_signal); while (stop==0) { printf("Hellon"); sleep(1); } } I am compiling…

VIEW QUESTION
Back To Top
Search