From 8cb285bc7eba95cdd3ad23d749bef2bc8c01d9d7 Mon Sep 17 00:00:00 2001 From: Trond Norbye Date: Thu, 27 Aug 2009 15:22:49 +0200 Subject: Print a message on stderr when the timeout occurs --- timedrun.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'timedrun.c') diff --git a/timedrun.c b/timedrun.c index 5c93ed7..04f6aa2 100644 --- a/timedrun.c +++ b/timedrun.c @@ -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; -- cgit v1.2.1