windows.py
Go to the documentation of this file.
00001 # NOTE: win32 support is currently experimental, and not recommended
00002 # for production use.
00003 
00004 
00005 from __future__ import absolute_import, division, print_function, with_statement
00006 import ctypes
00007 import ctypes.wintypes
00008 
00009 # See: http://msdn.microsoft.com/en-us/library/ms724935(VS.85).aspx
00010 SetHandleInformation = ctypes.windll.kernel32.SetHandleInformation
00011 SetHandleInformation.argtypes = (ctypes.wintypes.HANDLE, ctypes.wintypes.DWORD, ctypes.wintypes.DWORD)
00012 SetHandleInformation.restype = ctypes.wintypes.BOOL
00013 
00014 HANDLE_FLAG_INHERIT = 0x00000001
00015 
00016 
00017 def set_close_exec(fd):
00018     success = SetHandleInformation(fd, HANDLE_FLAG_INHERIT, 0)
00019     if not success:
00020         raise ctypes.GetLastError()


rosbridge_server
Author(s): Jonathan Mace
autogenerated on Thu Aug 27 2015 14:50:40