summaryrefslogtreecommitdiffstats
path: root/vendor/wait-timeout/src/bin
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/wait-timeout/src/bin')
-rw-r--r--vendor/wait-timeout/src/bin/exit.rs4
-rw-r--r--vendor/wait-timeout/src/bin/reader.rs7
-rw-r--r--vendor/wait-timeout/src/bin/sleep.rs4
3 files changed, 15 insertions, 0 deletions
diff --git a/vendor/wait-timeout/src/bin/exit.rs b/vendor/wait-timeout/src/bin/exit.rs
new file mode 100644
index 000000000..f33c49f34
--- /dev/null
+++ b/vendor/wait-timeout/src/bin/exit.rs
@@ -0,0 +1,4 @@
+fn main() {
+ let code = std::env::args().nth(1).unwrap().parse().unwrap();
+ std::process::exit(code);
+}
diff --git a/vendor/wait-timeout/src/bin/reader.rs b/vendor/wait-timeout/src/bin/reader.rs
new file mode 100644
index 000000000..94b017e64
--- /dev/null
+++ b/vendor/wait-timeout/src/bin/reader.rs
@@ -0,0 +1,7 @@
+use std::io::{Read, stdin};
+
+#[allow(unused_must_use)]
+fn main() {
+ let mut buffer: [u8; 32] = Default::default();
+ stdin().read(&mut buffer);
+}
diff --git a/vendor/wait-timeout/src/bin/sleep.rs b/vendor/wait-timeout/src/bin/sleep.rs
new file mode 100644
index 000000000..48dabdc02
--- /dev/null
+++ b/vendor/wait-timeout/src/bin/sleep.rs
@@ -0,0 +1,4 @@
+fn main() {
+ let amt = std::env::args().nth(1).unwrap().parse().unwrap();
+ std::thread::sleep(std::time::Duration::from_millis(amt));
+}