Fix bugs in the last change of ipc_gid option

- Fix semaphore gid control
- Do semaphore discard for all semaphores (although currently defined as 1)
- Fix the wrong check of return value from shmctl
This commit is contained in:
Takashi Iwai 2005-05-30 17:56:12 +00:00
parent 270da603fd
commit b69ab56881
2 changed files with 17 additions and 10 deletions

View file

@ -87,7 +87,7 @@ retryshm:
goto retryshm;
return err;
}
if (!shmctl(dmix->u.dmix.shmid_sum, IPC_STAT, &buf)) {
if (shmctl(dmix->u.dmix.shmid_sum, IPC_STAT, &buf) < 0) {
err = -errno;
shm_sum_discard(dmix);
return err;