From 9835e2ae736235810b4ea1c162ca5e65c547e770 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 18 May 2024 04:49:50 +0200 Subject: Merging upstream version 1.71.1+dfsg1. Signed-off-by: Daniel Baumann --- vendor/wait-timeout/src/bin/exit.rs | 4 ++++ vendor/wait-timeout/src/bin/reader.rs | 7 +++++++ vendor/wait-timeout/src/bin/sleep.rs | 4 ++++ 3 files changed, 15 insertions(+) create mode 100644 vendor/wait-timeout/src/bin/exit.rs create mode 100644 vendor/wait-timeout/src/bin/reader.rs create mode 100644 vendor/wait-timeout/src/bin/sleep.rs (limited to 'vendor/wait-timeout/src/bin') 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)); +} -- cgit v1.2.3