Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add more flags #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions unshare.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,20 @@ PyMODINIT_FUNC PyInit_unshare(void) {
PyObject *module = PyModule_Create(&unshare_module);

// clone constants
PyModule_AddIntConstant(module, "CLONE_NEWNS", CLONE_NEWNS); // mount namespace
PyModule_AddIntConstant(module, "CLONE_NEWUTS", CLONE_NEWUTS); // UTS (hostname) namespace
PyModule_AddIntConstant(module, "CLONE_NEWPID", CLONE_NEWPID); // PID namespace
PyModule_AddIntConstant(module, "CLONE_NEWUSER", CLONE_NEWUSER); // users namespace
PyModule_AddIntConstant(module, "CLONE_NEWIPC", CLONE_NEWIPC); // IPC namespace
PyModule_AddIntConstant(module, "CLONE_NEWNET", CLONE_NEWNET); // network namespace
PyModule_AddIntConstant(module, "CLONE_THREAD", CLONE_THREAD);
PyModule_AddIntConstant(module, "CLONE_NEWNS", CLONE_NEWNS); // mount namespace
PyModule_AddIntConstant(module, "CLONE_NEWUTS", CLONE_NEWUTS); // UTS (hostname) namespace
PyModule_AddIntConstant(module, "CLONE_NEWPID", CLONE_NEWPID); // PID namespace
PyModule_AddIntConstant(module, "CLONE_NEWUSER", CLONE_NEWUSER); // users namespace
PyModule_AddIntConstant(module, "CLONE_NEWIPC", CLONE_NEWIPC); // IPC namespace
PyModule_AddIntConstant(module, "CLONE_NEWNET", CLONE_NEWNET); // network namespace
PyModule_AddIntConstant(module, "CLONE_FILES", CLONE_FILES); // file descriptor table
PyModule_AddIntConstant(module, "CLONE_FS", CLONE_FS); // filesystem attributes
PyModule_AddIntConstant(module, "CLONE_NEWCGROUP", CLONE_NEWCGROUP); // cgroup namespace
PyModule_AddIntConstant(module, "CLONE_NEWTIME", CLONE_NEWTIME); // time namespace
PyModule_AddIntConstant(module, "CLONE_SYSVSEM", CLONE_SYSVSEM); // System V semaphore adjustment values
PyModule_AddIntConstant(module, "CLONE_THREAD", CLONE_THREAD); // thread group
PyModule_AddIntConstant(module, "CLONE_THREAD", CLONE_SIGHAND); // signal handlers and blocked signals
PyModule_AddIntConstant(module, "CLONE_THREAD", CLONE_VM); // virtual memory
Comment on lines +53 to +54
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Repeated CLONE_THREAD


return module;
}