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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Sun May 19 19:01:30 2024 UTC