From a4e2aa7135dbd4254d253f6e3ff017b9155fde5d Mon Sep 17 00:00:00 2001 From: Aaron Ball Date: Sun, 29 Dec 2019 23:33:09 -0700 Subject: Return exec exit code when condition is reached --- src/main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index 52f7e11..8736a3c 100644 --- a/src/main.c +++ b/src/main.c @@ -178,8 +178,7 @@ int main(int argc, char* argv[]) { // Determine if I'm dead if((now - lastlogin) > threshold) { printf("You're dead!\n"); - exec_cmd(cmd); - return 0; + return exec_cmd(cmd); } else if((lastlogin - now) > SECONDS_IN_DAY) { // Abort if last login is in the future. fprintf(stderr, -- cgit v1.2.3