Python os.get_inheritable() Method
Example
Find the inheritable flag of file:
#Import os Library
import os
#Open a file
fd = os.open("file.txt", os.O_RDWR)
#Print the inheritable flag of file descriptor
print (os.get_inheritable(fd))
Definition and Usage
The os.get_inheritable()
returns the inheritable flag of the file descriptor.
Inheritable flag of fd means if it can be inherited by the child processes or not.
Syntax
os.get_inheritable(fd)
Parameter Values
Parameter | Description |
---|---|
fd | Required. A file descriptor to be checked |
Technical Details
Return Value: | A bool value, representing the value of inheritable flag of file descriptor
|
---|---|
Python Version: | 3.4 |