1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
#![doc(html_root_url = "https://docs.rs/conch-runtime/0.1")]
#![cfg_attr(feature = "clippy", feature(plugin))]
#![cfg_attr(feature = "clippy", plugin(clippy))]
#![cfg_attr(all(not(test), feature = "clippy"), deny(print_stdout))]
#![cfg_attr(feature = "clippy", deny(wrong_self_convention))]
#![deny(missing_copy_implementations)]
#![deny(missing_debug_implementations)]
#![deny(missing_docs)]
#![deny(trivial_casts)]
#![deny(unused_import_braces)]
#![deny(unused_qualifications)]
#![cfg_attr(windows, feature(unique))]
#[cfg(unix)] extern crate libc;
#[cfg(windows)] extern crate kernel32;
#[cfg(windows)] extern crate winapi;
extern crate clap;
#[cfg(feature = "conch-parser")]
extern crate conch_parser;
#[macro_use] extern crate futures;
extern crate futures_cpupool;
extern crate glob;
#[macro_use] extern crate lazy_static;
extern crate mio;
#[macro_use] extern crate rental;
extern crate tokio_core;
extern crate tokio_io;
extern crate tokio_process;
extern crate void;
#[macro_use]
pub mod error;
pub mod env;
pub mod eval;
pub mod future;
pub mod io;
pub mod os;
pub mod path;
pub mod spawn;
mod exit_status;
mod future_ext;
mod ref_counted;
#[cfg(unix)]
#[path="sys/unix/mod.rs"]
mod sys;
#[cfg(windows)]
#[path="sys/windows/mod.rs"]
mod sys;
pub use self::exit_status::{EXIT_CMD_NOT_EXECUTABLE, EXIT_CMD_NOT_FOUND, EXIT_ERROR, EXIT_SUCCESS};
pub use self::exit_status::ExitStatus;
pub use self::ref_counted::RefCounted;
pub use self::spawn::Spawn;
const POLLED_TWICE: &str = "this future cannot be polled again after completion!";
const CANCELLED_TWICE: &str = "this future cannot be cancelled again after completion!";
const IFS_DEFAULT: &str = " \t\n";
pub const STDIN_FILENO: Fd = 0;
pub const STDOUT_FILENO: Fd = 1;
pub const STDERR_FILENO: Fd = 2;
lazy_static! {
static ref HOME: String = { String::from("HOME") };
}
pub type Fd = u16;
trait IntoInner: Sized {
type Inner;
fn inner(&self) -> &Self::Inner;
fn into_inner(self) -> Self::Inner;
fn from_inner(inner: Self::Inner) -> Self;
}