diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-02-06 22:38:05 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-02-16 16:01:03 -0800 |
| commit | 553b7e67d70dbf72dd705616acaa496a20fba765 (patch) | |
| tree | 4274ee5030cea6f05dbbb23f75c1c9eb4e58c2f1 /src/libstd/libc.rs | |
| parent | 13dc521861f6c3be909ba9317fde50f946e9f85d (diff) | |
Allow configuration of uid/gid/detach on processes
This just copies the libuv implementation for libnative which seems reasonable enough (uid/gid fail on windows). Closes #12082
Diffstat (limited to 'src/libstd/libc.rs')
| -rw-r--r-- | src/libstd/libc.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libstd/libc.rs b/src/libstd/libc.rs index 39383f99392..7dc4c692f63 100644 --- a/src/libstd/libc.rs +++ b/src/libstd/libc.rs @@ -159,7 +159,7 @@ pub use libc::funcs::c95::stdio::{fread, freopen, fseek, fsetpos, ftell}; pub use libc::funcs::c95::stdio::{fwrite, perror, puts, remove, rewind}; pub use libc::funcs::c95::stdio::{setbuf, setvbuf, tmpfile, ungetc}; -pub use libc::funcs::c95::stdlib::{abs, atof, atoi, calloc, exit}; +pub use libc::funcs::c95::stdlib::{abs, atof, atoi, calloc, exit, _exit}; pub use libc::funcs::c95::stdlib::{free, getenv, labs, malloc, rand}; pub use libc::funcs::c95::stdlib::{realloc, srand, strtod, strtol}; pub use libc::funcs::c95::stdlib::{strtoul, system}; @@ -1769,6 +1769,9 @@ pub mod consts { pub static MAX_PROTOCOL_CHAIN: DWORD = 7; pub static WSAPROTOCOL_LEN: DWORD = 255; pub static INVALID_SOCKET: DWORD = !0; + + pub static DETACHED_PROCESS: DWORD = 0x00000008; + pub static CREATE_NEW_PROCESS_GROUP: DWORD = 0x00000200; } pub mod sysconf { } @@ -3340,6 +3343,7 @@ pub mod funcs { pub fn realloc(p: *mut c_void, size: size_t) -> *mut c_void; pub fn free(p: *mut c_void); pub fn exit(status: c_int) -> !; + pub fn _exit(status: c_int) -> !; // Omitted: atexit. pub fn system(s: *c_char) -> c_int; pub fn getenv(s: *c_char) -> *c_char; |
