diff --git a/counter.c b/counter.c --- a/counter.c +++ b/counter.c @@ -25,7 +25,9 @@ start = time_str->tm_hour * 60 * 60 + time_str->tm_min * 60 + time_str->tm_sec; - system (argv[1]); + if (system (argv[1]) == -1) { + return EXIT_FAILURE; + } time (&t); time_str = gmtime (&t);