fix a bug for sem_init to sem_open