Fix task system dignostic to report real reason of the symaphore allocation fail

This commit is contained in:
Dmitry Babokin
2013-11-20 17:22:50 +04:00
parent 4977933d81
commit 40da411fa5

View File

@@ -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);
} }