Permalink
Browse files

Print a message on stderr when the timeout occurs

  • Loading branch information...
1 parent 9791b77 commit 8cb285bc7eba95cdd3ad23d749bef2bc8c01d9d7 Trond Norbye committed with dustin Aug 27, 2009
Showing with 3 additions and 0 deletions.
  1. +3 −0 timedrun.c
View
@@ -45,6 +45,9 @@ static int wait_for_process(pid_t pid)
case 0:
/* On the first iteration, pass the signal through */
sig = caught > 0 ? caught : SIGTERM;
+ if (caught == SIGALRM) {
+ fprintf(stderr, "Timeout.. killing the process\n");
+ }
break;
case 1:
sig = SIGTERM;

0 comments on commit 8cb285b

Please sign in to comment.