Python os.set_handle_inheritable() Examples

The following are code examples for showing how to use os.set_handle_inheritable(). They are extracted from open source Python projects. You can vote up the examples you like or vote down the exmaples you don't like. You can also save this page to your account.

Example 1
Project: oa_qian   Author: sunqb   File: _socket3.py    (license) View Source Project 5 votes vote down vote up
def set_inheritable(self, inheritable):
                os.set_handle_inheritable(self.fileno(), inheritable) 
Example 2
Project: RealtimePythonChat   Author: quangtqag   File: _socket3.py    (license) View Source Project 5 votes vote down vote up
def set_inheritable(self, inheritable):
                os.set_handle_inheritable(self.fileno(), inheritable) 
Example 3
Project: PySocket   Author: falseen   File: socket.py    (license) View Source Project 5 votes vote down vote up
def set_inheritable(self, inheritable):
            os.set_handle_inheritable(self.fileno(), inheritable) 
Example 4
Project: perf   Author: vstinner   File: _utils.py    (license) View Source Project 5 votes vote down vote up
def set_handle_inheritable(handle, inheritable):
            flags = HANDLE_FLAG_INHERIT if inheritable else 0

            ok = SetHandleInformation(handle, HANDLE_FLAG_INHERIT, flags)
            if not ok:
                raise WinError() 
Example 5
Project: perf   Author: vstinner   File: _utils.py    (license) View Source Project 5 votes vote down vote up
def to_subprocess(self):
        if MS_WINDOWS:
            set_handle_inheritable(self._handle, True)
            arg = self._handle
        else:
            set_inheritable(self._fd, True)
            arg = self._fd
        return str(arg) 
Example 6
Project: ouroboros   Author: pybee   File: socket.py    (license) View Source Project 5 votes vote down vote up
def set_inheritable(self, inheritable):
            os.set_handle_inheritable(self.fileno(), inheritable) 
Example 7
Project: zenchmarks   Author: squeaky-pl   File: _socket3.py    (license) View Source Project 5 votes vote down vote up
def set_inheritable(self, inheritable):
                os.set_handle_inheritable(self.fileno(), inheritable) 
Example 8
Project: kbe_server   Author: xiaohaoppy   File: socket.py    (license) View Source Project 5 votes vote down vote up
def set_inheritable(self, inheritable):
            os.set_handle_inheritable(self.fileno(), inheritable) 
Example 9
Project: Lixiang_zhaoxin   Author: hejaxian   File: _socket3.py    (license) View Source Project 5 votes vote down vote up
def set_inheritable(self, inheritable):
                os.set_handle_inheritable(self.fileno(), inheritable)