On this page
  1. posix.get_inheritable
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

posix.get_inheritable

Prev: posix.get_blocking | Up: posix | Next: posix.get_terminal_size
Rel: posix.abort, posix.access, posix.chdir, posix.chflags
Ref: docs.python.org — posix.get_inheritable
Tags: #public #python3 #stdlib #posix


Import

import posix
from posix import get_inheritable

Signature & Overview

posix.get_inheritable(fd, /)

Get the close-on-exe flag of the specified file descriptor.

Usage

import os

r, w = os.pipe()
try:
    assert os.get_inheritable(r) is False
finally:
    os.close(r); os.close(w)

Gotchas

REPL Inspect

from posix import get_inheritable
help(get_inheritable)

Linked from

Related notes