0x1949 Team - FAZEMRX - MANAGER
Edit File: fcntl.html
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" /> <title>36.10. fcntl — The fcntl and ioctl system calls — Python 2.7.18 documentation</title> <link rel="stylesheet" type="text/css" href="../_static/pygments.css" /> <link rel="stylesheet" type="text/css" href="../_static/classic.css" /> <script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script> <script src="../_static/jquery.js"></script> <script src="../_static/underscore.js"></script> <script src="../_static/doctools.js"></script> <script src="../_static/sidebar.js"></script> <link rel="search" type="application/opensearchdescription+xml" title="Search within Python 2.7.18 documentation" href="../_static/opensearch.xml"/> <link rel="author" title="About these documents" href="../about.html" /> <link rel="index" title="Index" href="../genindex.html" /> <link rel="search" title="Search" href="../search.html" /> <link rel="copyright" title="Copyright" href="../copyright.html" /> <link rel="next" title="36.11. pipes — Interface to shell pipelines" href="pipes.html" /> <link rel="prev" title="36.9. pty — Pseudo-terminal utilities" href="pty.html" /> <link rel="shortcut icon" type="image/png" href="../_static/py.png" /> <link rel="canonical" href="file:///usr/share/doc/python2.7/html/library/fcntl.html" /> <script type="text/javascript" src="../_static/copybutton.js"></script> </head><body> <div id="outdated-warning" style="padding: .5em; text-align: center; background-color: #FFBABA; color: #6A0E0E;"> This document is for an old version of Python that is <a href="https://devguide.python.org/devcycle/#end-of-life-branches">no longer supported</a>. You should install the python3 and python3-doc packages and read the <a href="file:///usr/share/doc/python3-doc/html/library/fcntl.html"> Python documentation for the Python3 version packaged in this release</a>. </div> <div class="related" role="navigation" aria-label="related navigation"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../genindex.html" title="General Index" accesskey="I">index</a></li> <li class="right" > <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > <a href="pipes.html" title="36.11. pipes — Interface to shell pipelines" accesskey="N">next</a> |</li> <li class="right" > <a href="pty.html" title="36.9. pty — Pseudo-terminal utilities" accesskey="P">previous</a> |</li> <li><img src="../_static/py.png" alt="" style="vertical-align: middle; margin-top: -1px"/></li> <li><a href="https://www.python.org/">Python</a> »</li> <li> <a href="../index.html">Python 2.7.18 documentation</a> » </li> <li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> »</li> <li class="nav-item nav-item-2"><a href="unix.html" accesskey="U"><span class="section-number">36. </span>Unix Specific Services</a> »</li> <li class="nav-item nav-item-this"><a href=""><span class="section-number">36.10. </span><code class="xref py py-mod docutils literal notranslate"><span class="pre">fcntl</span></code> — The <code class="docutils literal notranslate"><span class="pre">fcntl</span></code> and <code class="docutils literal notranslate"><span class="pre">ioctl</span></code> system calls</a></li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body" role="main"> <section id="module-fcntl"> <span id="fcntl-the-fcntl-and-ioctl-system-calls"></span><h1><span class="section-number">36.10. </span><a class="reference internal" href="#module-fcntl" title="fcntl: The fcntl() and ioctl() system calls. (Unix)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">fcntl</span></code></a> — The <code class="docutils literal notranslate"><span class="pre">fcntl</span></code> and <code class="docutils literal notranslate"><span class="pre">ioctl</span></code> system calls<a class="headerlink" href="#module-fcntl" title="Permalink to this headline">¶</a></h1> <p id="index-0">This module performs file control and I/O control on file descriptors. It is an interface to the <code class="xref c c-func docutils literal notranslate"><span class="pre">fcntl()</span></code> and <code class="xref c c-func docutils literal notranslate"><span class="pre">ioctl()</span></code> Unix routines. For a complete description of these calls, see <em class="manpage">fcntl(2)</em> and <em class="manpage">ioctl(2)</em> Unix manual pages.</p> <p>All functions in this module take a file descriptor <em>fd</em> as their first argument. This can be an integer file descriptor, such as returned by <code class="docutils literal notranslate"><span class="pre">sys.stdin.fileno()</span></code>, or a file object, such as <code class="docutils literal notranslate"><span class="pre">sys.stdin</span></code> itself, which provides a <a class="reference internal" href="io.html#io.IOBase.fileno" title="io.IOBase.fileno"><code class="xref py py-meth docutils literal notranslate"><span class="pre">fileno()</span></code></a> which returns a genuine file descriptor.</p> <p>The module defines the following functions:</p> <dl class="py function"> <dt class="sig sig-object py" id="fcntl.fcntl"> <span class="sig-prename descclassname"><span class="pre">fcntl.</span></span><span class="sig-name descname"><span class="pre">fcntl</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">fd</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">op</span></span></em><span class="optional">[</span>, <em class="sig-param"><span class="n"><span class="pre">arg</span></span></em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#fcntl.fcntl" title="Permalink to this definition">¶</a></dt> <dd><p>Perform the operation <em>op</em> on file descriptor <em>fd</em> (file objects providing a <a class="reference internal" href="io.html#io.IOBase.fileno" title="io.IOBase.fileno"><code class="xref py py-meth docutils literal notranslate"><span class="pre">fileno()</span></code></a> method are accepted as well). The values used for for <em>op</em> are operating system dependent, and are available as constants in the <a class="reference internal" href="#module-fcntl" title="fcntl: The fcntl() and ioctl() system calls. (Unix)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">fcntl</span></code></a> module, using the same names as used in the relevant C header files. The argument <em>arg</em> is optional, and defaults to the integer value <code class="docutils literal notranslate"><span class="pre">0</span></code>. When present, it can either be an integer value, or a string. With the argument missing or an integer value, the return value of this function is the integer return value of the C <code class="xref c c-func docutils literal notranslate"><span class="pre">fcntl()</span></code> call. When the argument is a string it represents a binary structure, e.g. created by <a class="reference internal" href="struct.html#struct.pack" title="struct.pack"><code class="xref py py-func docutils literal notranslate"><span class="pre">struct.pack()</span></code></a>. The binary data is copied to a buffer whose address is passed to the C <code class="xref c c-func docutils literal notranslate"><span class="pre">fcntl()</span></code> call. The return value after a successful call is the contents of the buffer, converted to a string object. The length of the returned string will be the same as the length of the <em>arg</em> argument. This is limited to 1024 bytes. If the information returned in the buffer by the operating system is larger than 1024 bytes, this is most likely to result in a segmentation violation or a more subtle data corruption.</p> <p>If the <code class="xref c c-func docutils literal notranslate"><span class="pre">fcntl()</span></code> fails, an <code class="xref py py-exc docutils literal notranslate"><span class="pre">IOError</span></code> is raised.</p> </dd></dl> <dl class="py function"> <dt class="sig sig-object py" id="fcntl.ioctl"> <span class="sig-prename descclassname"><span class="pre">fcntl.</span></span><span class="sig-name descname"><span class="pre">ioctl</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">fd</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">op</span></span></em><span class="optional">[</span>, <em class="sig-param"><span class="n"><span class="pre">arg</span></span></em><span class="optional">[</span>, <em class="sig-param"><span class="n"><span class="pre">mutate_flag</span></span></em><span class="optional">]</span><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#fcntl.ioctl" title="Permalink to this definition">¶</a></dt> <dd><p>This function is identical to the <a class="reference internal" href="#fcntl.fcntl" title="fcntl.fcntl"><code class="xref py py-func docutils literal notranslate"><span class="pre">fcntl()</span></code></a> function, except that the operations are typically defined in the library module <a class="reference internal" href="termios.html#module-termios" title="termios: POSIX style tty control. (Unix)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">termios</span></code></a> and the argument handling is even more complicated.</p> <p>The op parameter is limited to values that can fit in 32-bits. Additional constants of interest for use as the <em>op</em> argument can be found in the <a class="reference internal" href="termios.html#module-termios" title="termios: POSIX style tty control. (Unix)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">termios</span></code></a> module, under the same names as used in the relevant C header files.</p> <p>The parameter <em>arg</em> can be one of an integer, absent (treated identically to the integer <code class="docutils literal notranslate"><span class="pre">0</span></code>), an object supporting the read-only buffer interface (most likely a plain Python string) or an object supporting the read-write buffer interface.</p> <p>In all but the last case, behaviour is as for the <a class="reference internal" href="#fcntl.fcntl" title="fcntl.fcntl"><code class="xref py py-func docutils literal notranslate"><span class="pre">fcntl()</span></code></a> function.</p> <p>If a mutable buffer is passed, then the behaviour is determined by the value of the <em>mutate_flag</em> parameter.</p> <p>If it is false, the buffer’s mutability is ignored and behaviour is as for a read-only buffer, except that the 1024 byte limit mentioned above is avoided – so long as the buffer you pass is as least as long as what the operating system wants to put there, things should work.</p> <p>If <em>mutate_flag</em> is true, then the buffer is (in effect) passed to the underlying <a class="reference internal" href="#fcntl.ioctl" title="fcntl.ioctl"><code class="xref py py-func docutils literal notranslate"><span class="pre">ioctl()</span></code></a> system call, the latter’s return code is passed back to the calling Python, and the buffer’s new contents reflect the action of the <a class="reference internal" href="#fcntl.ioctl" title="fcntl.ioctl"><code class="xref py py-func docutils literal notranslate"><span class="pre">ioctl()</span></code></a>. This is a slight simplification, because if the supplied buffer is less than 1024 bytes long it is first copied into a static buffer 1024 bytes long which is then passed to <a class="reference internal" href="#fcntl.ioctl" title="fcntl.ioctl"><code class="xref py py-func docutils literal notranslate"><span class="pre">ioctl()</span></code></a> and copied back into the supplied buffer.</p> <p>If <em>mutate_flag</em> is not supplied, then from Python 2.5 it defaults to true, which is a change from versions 2.3 and 2.4. Supply the argument explicitly if version portability is a priority.</p> <p>If the <code class="xref c c-func docutils literal notranslate"><span class="pre">ioctl()</span></code> fails, an <code class="xref py py-exc docutils literal notranslate"><span class="pre">IOError</span></code> exception is raised.</p> <p>An example:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="kn">import</span> <span class="nn">array</span><span class="o">,</span> <span class="nn">fcntl</span><span class="o">,</span> <span class="nn">struct</span><span class="o">,</span> <span class="nn">termios</span><span class="o">,</span> <span class="nn">os</span> <span class="gp">>>> </span><span class="n">os</span><span class="o">.</span><span class="n">getpgrp</span><span class="p">()</span> <span class="go">13341</span> <span class="gp">>>> </span><span class="n">struct</span><span class="o">.</span><span class="n">unpack</span><span class="p">(</span><span class="s1">'h'</span><span class="p">,</span> <span class="n">fcntl</span><span class="o">.</span><span class="n">ioctl</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">termios</span><span class="o">.</span><span class="n">TIOCGPGRP</span><span class="p">,</span> <span class="s2">" "</span><span class="p">))[</span><span class="mi">0</span><span class="p">]</span> <span class="go">13341</span> <span class="gp">>>> </span><span class="n">buf</span> <span class="o">=</span> <span class="n">array</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="s1">'h'</span><span class="p">,</span> <span class="p">[</span><span class="mi">0</span><span class="p">])</span> <span class="gp">>>> </span><span class="n">fcntl</span><span class="o">.</span><span class="n">ioctl</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">termios</span><span class="o">.</span><span class="n">TIOCGPGRP</span><span class="p">,</span> <span class="n">buf</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span> <span class="go">0</span> <span class="gp">>>> </span><span class="n">buf</span> <span class="go">array('h', [13341])</span> </pre></div> </div> </dd></dl> <dl class="py function"> <dt class="sig sig-object py" id="fcntl.flock"> <span class="sig-prename descclassname"><span class="pre">fcntl.</span></span><span class="sig-name descname"><span class="pre">flock</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">fd</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">op</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#fcntl.flock" title="Permalink to this definition">¶</a></dt> <dd><p>Perform the lock operation <em>op</em> on file descriptor <em>fd</em> (file objects providing a <a class="reference internal" href="io.html#io.IOBase.fileno" title="io.IOBase.fileno"><code class="xref py py-meth docutils literal notranslate"><span class="pre">fileno()</span></code></a> method are accepted as well). See the Unix manual <em class="manpage">flock(2)</em> for details. (On some systems, this function is emulated using <code class="xref c c-func docutils literal notranslate"><span class="pre">fcntl()</span></code>.)</p> <p>If the <code class="xref c c-func docutils literal notranslate"><span class="pre">flock()</span></code> fails, an <code class="xref py py-exc docutils literal notranslate"><span class="pre">IOError</span></code> exception is raised.</p> </dd></dl> <dl class="py function"> <dt class="sig sig-object py" id="fcntl.lockf"> <span class="sig-prename descclassname"><span class="pre">fcntl.</span></span><span class="sig-name descname"><span class="pre">lockf</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">fd</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">operation</span></span></em><span class="optional">[</span>, <em class="sig-param"><span class="n"><span class="pre">length</span></span></em><span class="optional">[</span>, <em class="sig-param"><span class="n"><span class="pre">start</span></span></em><span class="optional">[</span>, <em class="sig-param"><span class="n"><span class="pre">whence</span></span></em><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#fcntl.lockf" title="Permalink to this definition">¶</a></dt> <dd><p>This is essentially a wrapper around the <a class="reference internal" href="#fcntl.fcntl" title="fcntl.fcntl"><code class="xref py py-func docutils literal notranslate"><span class="pre">fcntl()</span></code></a> locking calls. <em>fd</em> is the file descriptor of the file to lock or unlock, and <em>operation</em> is one of the following values:</p> <ul class="simple"> <li><p><code class="xref py py-const docutils literal notranslate"><span class="pre">LOCK_UN</span></code> – unlock</p></li> <li><p><code class="xref py py-const docutils literal notranslate"><span class="pre">LOCK_SH</span></code> – acquire a shared lock</p></li> <li><p><code class="xref py py-const docutils literal notranslate"><span class="pre">LOCK_EX</span></code> – acquire an exclusive lock</p></li> </ul> <p>When <em>operation</em> is <code class="xref py py-const docutils literal notranslate"><span class="pre">LOCK_SH</span></code> or <code class="xref py py-const docutils literal notranslate"><span class="pre">LOCK_EX</span></code>, it can also be bitwise ORed with <code class="xref py py-const docutils literal notranslate"><span class="pre">LOCK_NB</span></code> to avoid blocking on lock acquisition. If <code class="xref py py-const docutils literal notranslate"><span class="pre">LOCK_NB</span></code> is used and the lock cannot be acquired, an <code class="xref py py-exc docutils literal notranslate"><span class="pre">IOError</span></code> will be raised and the exception will have an <em>errno</em> attribute set to <code class="xref py py-const docutils literal notranslate"><span class="pre">EACCES</span></code> or <code class="xref py py-const docutils literal notranslate"><span class="pre">EAGAIN</span></code> (depending on the operating system; for portability, check for both values). On at least some systems, <code class="xref py py-const docutils literal notranslate"><span class="pre">LOCK_EX</span></code> can only be used if the file descriptor refers to a file opened for writing.</p> <p><em>length</em> is the number of bytes to lock, <em>start</em> is the byte offset at which the lock starts, relative to <em>whence</em>, and <em>whence</em> is as with <a class="reference internal" href="io.html#io.IOBase.seek" title="io.IOBase.seek"><code class="xref py py-func docutils literal notranslate"><span class="pre">io.IOBase.seek()</span></code></a>, specifically:</p> <ul class="simple"> <li><p><code class="xref py py-const docutils literal notranslate"><span class="pre">0</span></code> – relative to the start of the file (<a class="reference internal" href="os.html#os.SEEK_SET" title="os.SEEK_SET"><code class="xref py py-data docutils literal notranslate"><span class="pre">os.SEEK_SET</span></code></a>)</p></li> <li><p><code class="xref py py-const docutils literal notranslate"><span class="pre">1</span></code> – relative to the current buffer position (<a class="reference internal" href="os.html#os.SEEK_CUR" title="os.SEEK_CUR"><code class="xref py py-data docutils literal notranslate"><span class="pre">os.SEEK_CUR</span></code></a>)</p></li> <li><p><code class="xref py py-const docutils literal notranslate"><span class="pre">2</span></code> – relative to the end of the file (<a class="reference internal" href="os.html#os.SEEK_END" title="os.SEEK_END"><code class="xref py py-data docutils literal notranslate"><span class="pre">os.SEEK_END</span></code></a>)</p></li> </ul> <p>The default for <em>start</em> is 0, which means to start at the beginning of the file. The default for <em>length</em> is 0 which means to lock to the end of the file. The default for <em>whence</em> is also 0.</p> </dd></dl> <p>Examples (all on a SVR4 compliant system):</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">struct</span><span class="o">,</span> <span class="nn">fcntl</span><span class="o">,</span> <span class="nn">os</span> <span class="n">f</span> <span class="o">=</span> <span class="nb">open</span><span class="p">(</span><span class="o">...</span><span class="p">)</span> <span class="n">rv</span> <span class="o">=</span> <span class="n">fcntl</span><span class="o">.</span><span class="n">fcntl</span><span class="p">(</span><span class="n">f</span><span class="p">,</span> <span class="n">fcntl</span><span class="o">.</span><span class="n">F_SETFL</span><span class="p">,</span> <span class="n">os</span><span class="o">.</span><span class="n">O_NDELAY</span><span class="p">)</span> <span class="n">lockdata</span> <span class="o">=</span> <span class="n">struct</span><span class="o">.</span><span class="n">pack</span><span class="p">(</span><span class="s1">'hhllhh'</span><span class="p">,</span> <span class="n">fcntl</span><span class="o">.</span><span class="n">F_WRLCK</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span> <span class="n">rv</span> <span class="o">=</span> <span class="n">fcntl</span><span class="o">.</span><span class="n">fcntl</span><span class="p">(</span><span class="n">f</span><span class="p">,</span> <span class="n">fcntl</span><span class="o">.</span><span class="n">F_SETLKW</span><span class="p">,</span> <span class="n">lockdata</span><span class="p">)</span> </pre></div> </div> <p>Note that in the first example the return value variable <em>rv</em> will hold an integer value; in the second example it will hold a string value. The structure lay-out for the <em>lockdata</em> variable is system dependent — therefore using the <a class="reference internal" href="#fcntl.flock" title="fcntl.flock"><code class="xref py py-func docutils literal notranslate"><span class="pre">flock()</span></code></a> call may be better.</p> <div class="admonition seealso"> <p class="admonition-title">See also</p> <dl class="simple"> <dt>Module <a class="reference internal" href="os.html#module-os" title="os: Miscellaneous operating system interfaces."><code class="xref py py-mod docutils literal notranslate"><span class="pre">os</span></code></a></dt><dd><p>If the locking flags <a class="reference internal" href="os.html#os.O_SHLOCK" title="os.O_SHLOCK"><code class="xref py py-data docutils literal notranslate"><span class="pre">O_SHLOCK</span></code></a> and <a class="reference internal" href="os.html#os.O_EXLOCK" title="os.O_EXLOCK"><code class="xref py py-data docutils literal notranslate"><span class="pre">O_EXLOCK</span></code></a> are present in the <a class="reference internal" href="os.html#module-os" title="os: Miscellaneous operating system interfaces."><code class="xref py py-mod docutils literal notranslate"><span class="pre">os</span></code></a> module (on BSD only), the <a class="reference internal" href="os.html#os.open" title="os.open"><code class="xref py py-func docutils literal notranslate"><span class="pre">os.open()</span></code></a> function provides an alternative to the <a class="reference internal" href="#fcntl.lockf" title="fcntl.lockf"><code class="xref py py-func docutils literal notranslate"><span class="pre">lockf()</span></code></a> and <a class="reference internal" href="#fcntl.flock" title="fcntl.flock"><code class="xref py py-func docutils literal notranslate"><span class="pre">flock()</span></code></a> functions.</p> </dd> </dl> </div> </section> <div class="clearer"></div> </div> </div> </div> <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> <div class="sphinxsidebarwrapper"> <h4>Previous topic</h4> <p class="topless"><a href="pty.html" title="previous chapter"><span class="section-number">36.9. </span><code class="xref py py-mod docutils literal notranslate"><span class="pre">pty</span></code> — Pseudo-terminal utilities</a></p> <h4>Next topic</h4> <p class="topless"><a href="pipes.html" title="next chapter"><span class="section-number">36.11. </span><code class="xref py py-mod docutils literal notranslate"><span class="pre">pipes</span></code> — Interface to shell pipelines</a></p> <div role="note" aria-label="source link"> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../_sources/library/fcntl.rst.txt" rel="nofollow">Show Source</a></li> </ul> </div> <div id="searchbox" style="display: none" role="search"> <h3 id="searchlabel">Quick search</h3> <div class="searchformwrapper"> <form class="search" action="../search.html" method="get"> <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> <input type="submit" value="Go" /> </form> </div> </div> <script>$('#searchbox').show(0);</script> </div> </div> <div class="clearer"></div> </div> <div class="related" role="navigation" aria-label="related navigation"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../genindex.html" title="General Index" >index</a></li> <li class="right" > <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > <a href="pipes.html" title="36.11. pipes — Interface to shell pipelines" >next</a> |</li> <li class="right" > <a href="pty.html" title="36.9. pty — Pseudo-terminal utilities" >previous</a> |</li> <li><img src="../_static/py.png" alt="" style="vertical-align: middle; margin-top: -1px"/></li> <li><a href="https://www.python.org/">Python</a> »</li> <li> <a href="../index.html">Python 2.7.18 documentation</a> » </li> <li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> »</li> <li class="nav-item nav-item-2"><a href="unix.html" ><span class="section-number">36. </span>Unix Specific Services</a> »</li> <li class="nav-item nav-item-this"><a href=""><span class="section-number">36.10. </span><code class="xref py py-mod docutils literal notranslate"><span class="pre">fcntl</span></code> — The <code class="docutils literal notranslate"><span class="pre">fcntl</span></code> and <code class="docutils literal notranslate"><span class="pre">ioctl</span></code> system calls</a></li> </ul> </div> <div class="footer"> © <a href="../copyright.html">Copyright</a> 1990-2024, Python Software Foundation. <br /> The Python Software Foundation is a non-profit corporation. <a href="https://www.python.org/psf/donations/">Please donate.</a> <br /> Last updated on November 21, 2024. <a href="../bugs.html">Found a bug</a>? <br /> Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 4.3.2. </div> </body> </html>