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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ilia at astrive dot com
New email:
PHP Version: OS:

 

 [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 19:01:35 2025 UTC