summaryrefslogtreecommitdiff
path: root/tests/create1.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/create1.c')
-rw-r--r--tests/create1.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/create1.c b/tests/create1.c
index 841c565..2741401 100644
--- a/tests/create1.c
+++ b/tests/create1.c
@@ -4,7 +4,6 @@
void * func(void * arg)
{
- printf("Hello world\n");
return 0;
}
@@ -12,8 +11,14 @@ int
main()
{
pthread_t t;
- pthread_create(&t, NULL, func, NULL);
+ if (pthread_create(&t, NULL, func, NULL) != 0)
+ {
+ return 1;
+ }
+ /* A dirty hack, but we cannot rely on pthread_join in this
+ primitive test. */
Sleep(5000);
+
return 0;
}