[doc-en] master: Fix shmop_open, shmop_write and shmop_delete pages (#5976)

From: Date: Tue, 20 Oct 2026 12:56:01 +0000
Subject: [doc-en] master: Fix shmop_open, shmop_write and shmop_delete pages (#5976)
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-23867@lists.php.net to get a copy of this message
Author: qodelicious (qodelicious) Committer: GitHub (web-flow) Pusher: lacatoire Date: 2026-10-20T14:55:58+02:00 Commit: https://github.com/php/doc-en/commit/b189a6891d709765f37c6843cbf4f58d44ed847b Raw diff: https://github.com/php/doc-en/commit/b189a6891d709765f37c6843cbf4f58d44ed847b.diff Fix shmop_open, shmop_write and shmop_delete pages (#5976) * Fix shmop_open, shmop_write and shmop_delete pages * Apply suggestion from review Changed paths: M reference/shmop/functions/shmop-delete.xml M reference/shmop/functions/shmop-open.xml M reference/shmop/functions/shmop-write.xml Diff: diff --git a/reference/shmop/functions/shmop-delete.xml b/reference/shmop/functions/shmop-delete.xml index 8beee158b204..2947c07fc464 100644 --- a/reference/shmop/functions/shmop-delete.xml +++ b/reference/shmop/functions/shmop-delete.xml @@ -12,7 +12,8 @@ <methodparam><type>Shmop</type><parameter>shmop</parameter></methodparam> </methodsynopsis> <simpara> - <function>shmop_delete</function> is used to delete a shared memory block. + <function>shmop_delete</function> marks a shared memory block for deletion. + The block is only destroyed once every process has detached from it. </simpara> </refsect1> <refsect1 role="parameters"> @@ -36,6 +37,14 @@ </simpara> </refsect1> + <refsect1 role="errors"> + &reftitle.errors; + <simpara> + If the block cannot be marked for deletion, for example because the current + user does not own it, an <constant>E_WARNING</constant> is emitted. + </simpara> + </refsect1> + <refsect1 role="changelog"> &reftitle.changelog; <informaltable> diff --git a/reference/shmop/functions/shmop-open.xml b/reference/shmop/functions/shmop-open.xml index 9dac85653a27..140f837f6860 100644 --- a/reference/shmop/functions/shmop-open.xml +++ b/reference/shmop/functions/shmop-open.xml @@ -46,7 +46,7 @@ </listitem> <listitem> <simpara> - "c" for create (sets IPC_CREATE) + "c" for create (sets IPC_CREAT) use this flag when you need to create a new shared memory segment or if a segment with the same key exists, try to open it for read and write @@ -61,7 +61,7 @@ </listitem> <listitem> <simpara> - "n" create a new memory segment (sets IPC_CREATE|IPC_EXCL) + "n" create a new memory segment (sets IPC_CREAT|IPC_EXCL) use this flag when you want to create a new shared memory segment but if one already exists with the same flag, fail. This is useful for security purposes, using this you can prevent race condition @@ -111,8 +111,9 @@ <refsect1 role="errors"> &reftitle.errors; <simpara> - If <parameter>mode</parameter> is invalid, or <parameter>size</parameter> is less than or equal to zero, - a <classname>ValueError</classname> is thrown. + If <parameter>mode</parameter> is invalid, or <parameter>size</parameter> is less than or equal to zero + for the <literal>"c"</literal> and <literal>"n"</literal> modes, + a <exceptionname>ValueError</exceptionname> is thrown. On other failures, <constant>E_WARNING</constant> is emitted. </simpara> </refsect1> @@ -138,8 +139,9 @@ <row> <entry>8.0.0</entry> <entry> - If <parameter>mode</parameter> is invalid, or <parameter>size</parameter> is less than or equal to zero, - a <classname>ValueError</classname> is thrown; previously <constant>E_WARNING</constant> was emitted instead, + If <parameter>mode</parameter> is invalid, or <parameter>size</parameter> is less than or equal to zero + for the <literal>"c"</literal> and <literal>"n"</literal> modes, + a <exceptionname>ValueError</exceptionname> is thrown; previously <constant>E_WARNING</constant> was emitted instead, and the function returned &false;. </entry> </row> diff --git a/reference/shmop/functions/shmop-write.xml b/reference/shmop/functions/shmop-write.xml index 9f3663e9f97c..5ed6d417e60e 100644 --- a/reference/shmop/functions/shmop-write.xml +++ b/reference/shmop/functions/shmop-write.xml @@ -59,8 +59,8 @@ <refsect1 role="errors"> &reftitle.errors; <simpara> - If <parameter>offset</parameter> is out of range, or a read-only shared memory segment - should be written to, a <classname>ValueError</classname> is thrown. + If <parameter>offset</parameter> is out of range, a <exceptionname>ValueError</exceptionname> is thrown. + If the shared memory segment was opened read-only, an <exceptionname>Error</exceptionname> is thrown. </simpara> </refsect1>

« previous php.doc.cvs (#23867) next »