summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryant Mairs <bryant@mai.rs>2017-07-16 21:38:19 -0700
committerBryant Mairs <bryant@mai.rs>2017-07-18 13:04:36 -0700
commitd3f733c264a657ac1e6ac3eb8579ae5c871f38ca (patch)
tree8b760148731e74777b1a57129c07184690d503b0
parent74ea3c7220e616ada07544d9d82d39acd12c2588 (diff)
downloadnix-d3f733c264a657ac1e6ac3eb8579ae5c871f38ca.zip
Remove broken execvpe implementation
It was broken when enabled, and currently the libc definition is only available for windows. This will be re-added when a new libc is released that supports it across all available platforms
-rw-r--r--Cargo.toml3
-rw-r--r--src/unistd.rs22
-rw-r--r--test/test_unistd.rs4
3 files changed, 0 insertions, 29 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 3fdf2802..c47dfaf6 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -15,9 +15,6 @@ exclude = [
"test/**/*"
]
-[features]
-execvpe = []
-
[dependencies]
libc = "0.2.25"
bitflags = "0.9"
diff --git a/src/unistd.rs b/src/unistd.rs
index 196232b6..25237a07 100644
--- a/src/unistd.rs
+++ b/src/unistd.rs
@@ -1596,9 +1596,6 @@ mod linux {
use {Errno, Result, NixPath};
use super::{Uid, Gid};
- #[cfg(feature = "execvpe")]
- use std::ffi::CString;
-
pub fn pivot_root<P1: ?Sized + NixPath, P2: ?Sized + NixPath>(
new_root: &P1, put_old: &P2) -> Result<()> {
let res = try!(try!(new_root.with_nix_path(|new_root| {
@@ -1643,23 +1640,4 @@ mod linux {
Errno::result(res).map(drop)
}
-
- #[inline]
- #[cfg(feature = "execvpe")]
- pub fn execvpe(filename: &CString, args: &[CString], env: &[CString]) -> Result<()> {
- use std::ptr;
- use libc::c_char;
-
- let mut args_p: Vec<*const c_char> = args.iter().map(|s| s.as_ptr()).collect();
- args_p.push(ptr::null());
-
- let mut env_p: Vec<*const c_char> = env.iter().map(|s| s.as_ptr()).collect();
- env_p.push(ptr::null());
-
- unsafe {
- super::ffi::execvpe(filename.as_ptr(), args_p.as_ptr(), env_p.as_ptr())
- };
-
- Err(Error::Sys(Errno::last()))
- }
}
diff --git a/test/test_unistd.rs b/test/test_unistd.rs
index e6e7b5f2..fd4e327b 100644
--- a/test/test_unistd.rs
+++ b/test/test_unistd.rs
@@ -227,10 +227,6 @@ fn test_lseek64() {
execve_test_factory!(test_execve, execve, b"/bin/sh", b"/system/bin/sh");
-#[cfg(any(target_os = "linux", target_os = "android"))]
-#[cfg(feature = "execvpe")]
-execve_test_factory!(test_execvpe, execvpe, b"sh", b"sh");
-
#[test]
fn test_fpathconf_limited() {
let f = tempfile().unwrap();