note 125801 added to function.sem-get
| From: | DanEast@php.net | Date: | Tue, 09 Feb 2021 13:42:57 +0000 |
| Subject: | note 125801 added to function.sem-get | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-219159@lists.php.net to get a copy of this message | ||
Note that the default permissions parameter is octal! Thus the default of 0666 is NOT the same as
666, or 0x666.
If you specify the permission as decimal 666 then you end up with permissions that prevent the
semaphore from being read. The symptom is that you can only sem_get it once, and subsequent sem_get
will fail (until you ipcrm or sem_remove it and delete it entirely).
Thus these are all equivalent to the default:
sem_get ( 123, 1, 0666)
sem_get ( 123, 1, 438)
sem_get ( 123, 1, 0x1b6)
Most PHP developers (myself included) work with octal numbers so infrequently that the number 0666
can easily be mistaken as 666 or maybe 0x666.
----
Server IP: 45.112.84.4
Probable Submitter: 45.91.159.166 (proxied: 184.170.88.67)
----
Manual Page -- http://php.net/manual/en/function.sem-get.php
Edit -- https://master.php.net/note/edit/125801
Del: integrated -- https://master.php.net/note/delete/125801/integrated
Del: useless -- https://master.php.net/note/delete/125801/useless
Del: bad code -- https://master.php.net/note/delete/125801/bad+code
Del: spam -- https://master.php.net/note/delete/125801/spam
Del: non-english -- https://master.php.net/note/delete/125801/non-english
Del: in docs -- https://master.php.net/note/delete/125801/in+docs
Del: other reasons-- https://master.php.net/note/delete/125801
Reject -- https://master.php.net/note/reject/125801
Search -- https://master.php.net/manage/user-notes.php