Skip to content

Commit f4b7780

Browse files
committed
docs: add an actual Python-level wrapper for winpid_to_pid() so that the documentation can still build on rtd
1 parent eafb7cf commit f4b7780

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

cygwin/__init__.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,20 @@ def cygpath(path, mode='unix', absolute=True):
121121
return _cygwin.conv_path(what, path)
122122

123123

124-
# This one is easy--just use the low-level implementation directly
125-
winpid_to_pid = _cygwin.winpid_to_pid
124+
def winpid_to_pid(pid):
125+
"""
126+
Converts the native Windows PID of a Cygwin process to its Cygwin PID.
127+
128+
Sometimes these are identical, but they don't have to be. Raises an
129+
`OSError` if the PID does not exist, or does not map to a Cygwin PID.
130+
131+
Parameters
132+
----------
133+
pid : `int`
134+
The PID of a Windows process to look up in Cygwin.
135+
"""
136+
137+
return _cygwin.winpid_to_pid(pid)
126138

127139

128140
def pid_to_winpid(pid):

0 commit comments

Comments
 (0)