Skip to content

Commit 8cb285b

Browse files
Trond Norbyedustin
Trond Norbye
authored andcommitted
Print a message on stderr when the timeout occurs
1 parent 9791b77 commit 8cb285b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

timedrun.c

+3
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ static int wait_for_process(pid_t pid)
4545
case 0:
4646
/* On the first iteration, pass the signal through */
4747
sig = caught > 0 ? caught : SIGTERM;
48+
if (caught == SIGALRM) {
49+
fprintf(stderr, "Timeout.. killing the process\n");
50+
}
4851
break;
4952
case 1:
5053
sig = SIGTERM;

0 commit comments

Comments
 (0)