From 3fb471cc28899036990751f18e2ccb83bf897411 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 22 Sep 2004 00:28:00 +0000 Subject: [PATCH] thread_join() the -ex process if THREAD_JOIN_IMPLEMENTED. --- src/threads/init.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/threads/init.c b/src/threads/init.c index 26b9345..855afa0 100644 --- a/src/threads/init.c +++ b/src/threads/init.c @@ -112,8 +112,13 @@ main (void) /* Run a user program. */ if (initial_program != NULL) { + tid_t tid; printf ("\nExecuting '%s':\n", initial_program); - process_execute (initial_program); + tid = process_execute (initial_program); +#ifdef THREAD_JOIN_IMPLEMENTED + if (tid != TID_ERROR) + thread_join (tid); +#endif } #else test (); -- 2.30.2