Bug #3621: semaphores does not works
| From: | ilia at astrive dot com | Date: | Fri, 25 Feb 2000 15:39:29 +0000 |
| Subject: | Bug #3621: semaphores does not works | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-15997@lists.php.net to get a copy of this message | ||
From: ilia@astrive.com
Operating system: SunOS 5.7 Generic_106542-06 i86pc i386 i86pc
PHP version: 3.0.14
PHP Bug Type: Other
Bug description: semaphores does not works
Bug description:
System V semaphores don't work.
Solution:
This bug is in sysvsem.c file
look at lines near 273:
/* This is correct for Solaris 2.6 which does not have union semun. */
if (semctl(semid, SYSVSEM_SEM, SETVAL, &max_acquire) == -1) {
php3_error(E_WARNING, "semctl(SETVAL) failed for key 0x%x: %s", key, strerror(errno));
}
must be not "&max_acquire" but "max_acquire"!!!
the correct line is:
if (semctl(semid, SYSVSEM_SEM, SETVAL, max_acquire) == -1)
best regards,
Ilia Stepanov