We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e5767d7 + 7e20e11 commit 45572a1Copy full SHA for 45572a1
src/main.rs
@@ -20,6 +20,12 @@ pub struct Cli {
20
#[structopt(long)]
21
daemon: bool,
22
23
+ /// Monitor stdin and terminate when stdin closes.
24
+ ///
25
+ /// This flag is not cmopatible with the daemon flag
26
+ #[structopt(long)]
27
+ stdin: bool,
28
+
29
#[structopt(subcommand)]
30
cmd: Cmd,
31
}
@@ -98,7 +104,7 @@ pub fn main() -> Result {
98
104
loop {
99
105
tokio::select!(
100
106
_ = signal::ctrl_c() => break,
101
- read = stdin.read(&mut in_buf), if !cli.daemon => if let Ok(0) = read { break },
107
+ read = stdin.read(&mut in_buf), if cli.stdin => if let Ok(0) = read { break },
102
108
)
103
109
110
shutdown_trigger.trigger()
0 commit comments