diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-03-17 11:51:21 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-03-30 20:31:13 -0700 |
commit | 9e1e383021c82a78c9c3a0c23b3f76016a5569ed (patch) | |
tree | 80aaee87943bab87dfe1021858e1a81ec897dd5c /src | |
parent | 9e73cd99f48ace69c17a5dea20f4aa18b8874055 (diff) |
Add alarm() call to kill processes after 5 minutes
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/server.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/server.c b/src/server.c index 21c378d..d9bb996 100644 --- a/src/server.c +++ b/src/server.c @@ -754,6 +754,10 @@ XhivOpenServer(xhiv_response *responses, pid_t *return_pid) fflush(stdout); fflush(stderr); + /* All tests should finish in less than 5 minutes - set timer to kill + any processes that fail to notice their other half crashed */ + alarm(300); + kidpid = fork(); if (kidpid == 0) { /* child */ free(display); |