//! Bindings for executing child processes
-#![allow(experimental)]
+#![allow(unstable)]
#![allow(non_upper_case_globals)]
pub use self::StdioContainer::*;
use collections::HashMap;
use ffi::CString;
use fmt;
-use hash::Hash;
use io::pipe::{PipeStream, PipePair};
use io::{IoResult, IoError};
use io;
}
}
-impl fmt::String for Command {
+impl fmt::Debug for Command {
/// Format the program and arguments of a Command for display. Any
/// non-utf8 data is lossily converted using the utf8 replacement
/// character.
/// Describes the result of a process after it has terminated.
/// Note that Windows have no signals, so the result is usually ExitStatus.
-#[derive(PartialEq, Eq, Clone, Copy)]
+#[derive(PartialEq, Eq, Clone, Copy, Show)]
pub enum ProcessExit {
/// Normal termination with an exit status.
ExitStatus(int),
ExitSignal(int),
}
-impl fmt::Show for ProcessExit {
- /// Format a ProcessExit enum, to nicely present the information.
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- fmt::String::fmt(self, f)
- }
-}
-
-
-impl fmt::String for ProcessExit {
+#[stable]
+impl fmt::Display for ProcessExit {
/// Format a ProcessExit enum, to nicely present the information.
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
/// # Example
///
/// ```no_run
- /// # #![allow(experimental)]
+ /// # #![allow(unstable)]
/// use std::io::{Command, IoResult};
/// use std::io::process::ProcessExit;
///
/// p.wait()
/// }
/// ```
- #[experimental = "the type of the timeout is likely to change"]
+ #[unstable = "the type of the timeout is likely to change"]
pub fn set_timeout(&mut self, timeout_ms: Option<u64>) {
self.deadline = timeout_ms.map(|i| i + sys::timer::now()).unwrap_or(0);
}