We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e840da9 commit fff07bdCopy full SHA for fff07bd
os/os/__init__.py
@@ -39,6 +39,7 @@ def errno_(val=None):
39
read_ = libc.func("i", "read", "ipi")
40
write_ = libc.func("i", "write", "iPi")
41
close_ = libc.func("i", "close", "i")
42
+dup_ = libc.func("i", "dup", "i")
43
access_ = libc.func("i", "access", "si")
44
fork_ = libc.func("i", "fork", "")
45
pipe_ = libc.func("i", "pipe", "p")
@@ -184,6 +185,11 @@ def close(fd):
184
185
check_error(r)
186
return r
187
188
+def dup(fd):
189
+ r = dup_(fd)
190
+ check_error(r)
191
+ return r
192
+
193
def access(path, mode):
194
return access_(path, mode) == 0
195
0 commit comments