Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--rainbow/rainbow/util.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/rainbow/rainbow/util.py b/rainbow/rainbow/util.py
index 24c3a03..be78711 100644
--- a/rainbow/rainbow/util.py
+++ b/rainbow/rainbow/util.py
@@ -240,19 +240,20 @@ syscall = libc.syscall
# int clone(int number, int flags, void *child_stack, int *parent_tidptr, int *child_tidptr)
SYS_clone = 120
-SYS_unshare = 310
def clone(flags):
"""Perform sys_clone() system call, which creates a new process in
a manner similar to fork(). If flags is SIGCHLD, then this is
- identical to fork()."""
+ identical to fork().
+ XXX: i386 wrapper. <MS>"""
return libc_errcheck(syscall(SYS_clone, flags, None), None, None)
-def unshare(flags):
- """Perform sys_unshare() system call, which allows the calling process
- to disassociate part of its execution context from that part of its
- execution context which is shared with other processes."""
- return libc_errcheck(syscall(SYS_unshare, flags, None), None, None)
+# int unshare(int flags);
+unshare = libc.unshare
+unshare.__doc__ = "Libc's unshare call; see unshare (2)"
+unshare.argtypes = [c_int]
+unshare.restype = c_int
+unshare.errcheck = libc_errcheck
# int daemon(int nochdir, int noclose);
daemon = libc.daemon