summaryrefslogtreecommitdiffstats
path: root/vendor/wait-timeout/src/bin
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:50 +0000
commit9835e2ae736235810b4ea1c162ca5e65c547e770 (patch)
tree3fcebf40ed70e581d776a8a4c65923e8ec20e026 /vendor/wait-timeout/src/bin
parentReleasing progress-linux version 1.70.0+dfsg2-1~progress7.99u1. (diff)
downloadrustc-9835e2ae736235810b4ea1c162ca5e65c547e770.tar.xz
rustc-9835e2ae736235810b4ea1c162ca5e65c547e770.zip
Merging upstream version 1.71.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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));
+}