Skip to content

Commit 9f8a421

Browse files
authored
proc_close: clarify termination status in regard to proc_get_status
Explain how proc_get_status may interfere with proc_close return value.
1 parent 13cc59c commit 9f8a421

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

reference/exec/functions/proc-close.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@
4848
Returns the termination status of the process that was run. In case of
4949
an error then <literal>-1</literal> is returned.
5050
</para>
51+
<para>
52+
If <function>proc_get_status</function> is called before <function>proc_close</function>,
53+
and finds the process not in "running" state anymore, and retrieves the exit code, then
54+
<function>proc_close</function> will also return <literal>-1</literal>.
55+
</para>
5156
&note.sigchild;
5257
</refsect1>
5358

0 commit comments

Comments
 (0)