Fix task system dignostic to report real reason of the symaphore allocation fail
This commit is contained in:
@@ -696,7 +696,7 @@ InitTaskSystem() {
|
|||||||
sprintf(name, "ispc_task.%d", (int)getpid());
|
sprintf(name, "ispc_task.%d", (int)getpid());
|
||||||
workerSemaphore = sem_open(name, O_CREAT, S_IRUSR|S_IWUSR, 0);
|
workerSemaphore = sem_open(name, O_CREAT, S_IRUSR|S_IWUSR, 0);
|
||||||
if (!workerSemaphore) {
|
if (!workerSemaphore) {
|
||||||
fprintf(stderr, "Error creating semaphore: %s\n", strerror(err));
|
fprintf(stderr, "Error creating semaphore (%s): %s\n", name, strerror(errno));
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user