diff options
-rw-r--r-- | gdb/testsuite/gdb.base/fork-running-state.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gdb/testsuite/gdb.base/fork-running-state.c b/gdb/testsuite/gdb.base/fork-running-state.c index 8ea4739..65ca942 100644 --- a/gdb/testsuite/gdb.base/fork-running-state.c +++ b/gdb/testsuite/gdb.base/fork-running-state.c @@ -27,6 +27,9 @@ int save_parent; static int fork_child (void) { + /* Don't run forever. */ + alarm (180); + while (1) pause (); @@ -38,6 +41,9 @@ fork_child (void) static int fork_parent (void) { + /* Don't run forever. */ + alarm (180); + while (1) pause (); @@ -51,9 +57,6 @@ main (void) save_parent = getpid (); - /* Don't run forever. */ - alarm (180); - /* The parent and child should basically run forever without tripping on any debug event. We want to check that GDB updates the parent and child running states correctly right after the |