stack = c_char_p(' ' * 8096)

def f():
    print(libc.getpid())
return 0
f_c = CFUNCTYPE(c_int)(f)
stack_top = c_void_p(cast(stack, c_void_p).value + 8096)
libc.clone(f_c, stack_top, 536870912)
clone process support in python