reference/filesystem/functions/popen.xml
0c9c2dd669fe9395eaa73d487fbd160f9057429a
...
...
@@ -1,6 +1,6 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.popen">
3
+
<refentry xml:id="function.popen" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
5
5
<refname>popen</refname>
6
6
<refpurpose>Opens process file pointer</refpurpose>
...
...
@@ -9,7 +9,7 @@
9
9
<refsect1 role="description">
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
-
<type>resource</type><methodname>popen</methodname>
12
+
<type class="union"><type>resource</type><type>false</type></type><methodname>popen</methodname>
13
13
<methodparam><type>string</type><parameter>command</parameter></methodparam>
14
14
<methodparam><type>string</type><parameter>mode</parameter></methodparam>
15
15
</methodsynopsis>
...
...
@@ -35,7 +35,14 @@
35
35
<term><parameter>mode</parameter></term>
36
36
<listitem>
37
37
<para>
38
-
The mode
38
+
The mode. Either <literal>'r'</literal> for reading, or <literal>'w'</literal>
39
+
for writing.
40
+
</para>
41
+
<para>
42
+
On Windows, <function>popen</function> defaults to text mode, i.e. any <literal>\n</literal>
43
+
characters written to or read from the pipe will be translated to <literal>\r\n</literal>.
44
+
If this is not desired, binary mode can be enforced by setting <parameter>mode</parameter>
45
+
to <literal>'rb'</literal> and <literal>'wb'</literal>, respectively.
39
46
</para>
40
47
</listitem>
41
48
</varlistentry>
...
...
@@ -107,8 +114,6 @@ pclose($handle);
107
114
<function>proc_open</function>.
108
115
</para>
109
116
</note>
110
-
&note.exec-path;
111
-
&warn.sm.exec;
112
117
</refsect1>
113
118
114
119
<refsect1 role="seealso">
...
...
@@ -123,7 +128,6 @@ pclose($handle);
123
128
</refsect1>
124
129

125
130
</refentry>
126
-

127
131
<!-- Keep this comment at the end of the file
128
132
Local variables:
129
133
mode: sgml
130
134