projects
/
pintos-anon
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
28287df
)
thread_join() the -ex process if THREAD_JOIN_IMPLEMENTED.
author
Ben Pfaff
<blp@cs.stanford.edu>
Wed, 22 Sep 2004 00:28:00 +0000
(
00:28
+0000)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Wed, 22 Sep 2004 00:28:00 +0000
(
00:28
+0000)
src/threads/init.c
patch
|
blob
|
history
diff --git
a/src/threads/init.c
b/src/threads/init.c
index 26b9345879c1848ce1d7321ea6e68160854e022f..855afa0340fcb66788aa03a00cc70666b17bbbae 100644
(file)
--- 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 ();