|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #67990 Add optional nowait argument to sem_acquire
Submitted: 2014-09-10 05:27 UTC Modified: 2014-09-10 05:49 UTC
From: Assigned: mbeccati (profile)
Status: Closed Package: Semaphore related
PHP Version: 5.6.1 OS: Anything but Windows
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.
Block user comment
Status: Assign to:
Bug Type:
New email:
PHP Version: OS:


 [2014-09-10 05:27 UTC]
Historically sem_acquire blocks the caller until the semaphore is acquired. The new option will allow the function to return immediately in case the semaphore is not available.

Bug #39168 suggests adding a timeout, but the underlying semop() function doesn't allow that. Some OSes (Linux, Solaris) have semtimedop(), but given it's not universally supported, I left it out.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-09-10 05:49 UTC]
-Status: Open +Status: Closed -PHP Version: 5.6Git-2014-09-10 (Git) +PHP Version: 5.6.1 -Assigned To: +Assigned To: mbeccati
 [2014-09-10 05:49 UTC]
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at

 For Windows:
Thank you for the report, and for helping us make PHP better.

   3571a68..0b648a4  PHP-5.6 -> PHP-5.6
   5b82430..205b6b8  master -> master
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sun Oct 01 12:01:23 2023 UTC