php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3621 semaphores does not works
Submitted: 2000-02-25 10:39 UTC Modified: 2000-04-03 14:26 UTC
From: ilia at astrive dot com Assigned:
Status: Closed Package: Other
PHP Version: 3.0.14 OS: SunOS 5.7 Generic_106542-06 i86p
Private report: No CVE-ID: None
 [2000-02-25 10:39 UTC] ilia at astrive dot com
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


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-04-03 14:26 UTC] sas at cvs dot php dot net
Fixed in CVS. Thanks for your report.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 21:01:34 2025 UTC