<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Create a fifo special file (a named pipe)</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.posix-kill.html">posix_kill</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.posix-mknod.html">posix_mknod</a></div> <div class="up"><a href="ref.posix.html">POSIX Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="function.posix-mkfifo" class="refentry"> <div class="refnamediv"> <h1 class="refname">posix_mkfifo</h1> <p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">posix_mkfifo</span> — <span class="dc-title">Create a fifo special file (a named pipe)</span></p> </div> <div class="refsect1 description" id="refsect1-function.posix-mkfifo-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="type">bool</span> <span class="methodname"><strong>posix_mkfifo</strong></span> ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$pathname</code></span> , <span class="methodparam"><span class="type">int</span> <code class="parameter">$mode</code></span> )</div> <p class="para rdfs-comment"> <span class="function"><strong>posix_mkfifo()</strong></span> creates a special <em>FIFO</em> file which exists in the file system and acts as a bidirectional communication endpoint for processes. </p> </div> <div class="refsect1 parameters" id="refsect1-function.posix-mkfifo-parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <span class="term"><em><code class="parameter">pathname</code></em></span> <dd> <p class="para"> Path to the <em>FIFO</em> file. </p> </dd> </dt> <dt> <span class="term"><em><code class="parameter">mode</code></em></span> <dd> <p class="para"> The second parameter <em><code class="parameter">mode</code></em> has to be given in octal notation (e.g. 0644). The permission of the newly created <em>FIFO</em> also depends on the setting of the current <span class="function"><a href="function.umask.html" class="function">umask()</a></span>. The permissions of the created file are (mode & ~umask). </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues" id="refsect1-function.posix-mkfifo-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns <strong><code>TRUE</code></strong> on success or <strong><code>FALSE</code></strong> on failure. </p> </div> <div class="refsect1 notes" id="refsect1-function.posix-mkfifo-notes"> <h3 class="title">Notes</h3> <blockquote class="note"><p><strong class="note">Note</strong>: <span class="simpara">When <a href="features.safe-mode.html" class="link">safe mode</a> is enabled, PHP checks whether the files or directories being operated upon have the same UID (owner) as the script that is being executed.</span></p></blockquote> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.posix-kill.html">posix_kill</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.posix-mknod.html">posix_mknod</a></div> <div class="up"><a href="ref.posix.html">POSIX Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>