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

c_int instead of c_uint for CLONE_* #124

Closed
MarkSwanson opened this issue Dec 30, 2015 · 2 comments
Closed

c_int instead of c_uint for CLONE_* #124

MarkSwanson opened this issue Dec 30, 2015 · 2 comments

Comments

@MarkSwanson
Copy link

These are the correct definitions:

pub const CLONE_NEWUTS: ::c_int = 0x04000000;
pub const CLONE_NEWIPC: ::c_int = 0x08000000;
pub const CLONE_NEWUSER: ::c_int = 0x10000000;
pub const CLONE_NEWPID: ::c_int = 0x20000000;
pub const CLONE_NEWNET: ::c_int = 0x40000000;
pub const CLONE_IO: ::c_int = 0x80000000;

These are #define in vi /usr/include/linux/sched.h

They must be c_int because:

  • int unshare(int flags);
  • int clone(int (*fn)(void *), void *child_stack, int flags, ...
@alexcrichton
Copy link
Member

Ah probably a mistake on my part, feel free to submit a PR!

@alexcrichton
Copy link
Member

I believe this was fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants