fibo_load_image now notices if spawn_thread() fails, and puts a warning to stderr.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19763 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2007-01-10 10:02:46 +00:00
parent daf593cf9c
commit e90cdf4e48

View File

@ -56,8 +56,17 @@ main(int argc, char *argv[])
snprintf(buffer, sizeof(buffer), "%d", num - 1);
thread_id threadA = load_image(argCount, (const char**)args, (const char**)environ);
if (threadA < B_OK) {
fprintf(stderr, "Could not create thread A: %s\n", strerror(threadA));
return -1;
}
snprintf(buffer, sizeof(buffer), "%d", num - 2);
thread_id threadB = load_image(argCount, (const char**)args, (const char**)environ);
if (threadB < B_OK) {
fprintf(stderr, "Could not create thread B: %s\n", strerror(threadB));
return -1;
}
resume_thread(threadA);
resume_thread(threadB);