[PHP-DEV] Bug #3621: semaphores does not works From: ilia <email protected>
Date: 02/25/00

From: ilia <email protected>
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

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>