|  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
 [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: Fri Sep 29 00:01:24 2023 UTC