From e4c20372dd0536da07d5d94f2a0428de47369c84 Mon Sep 17 00:00:00 2001 From: Julio Montes Date: Fri, 21 Feb 2020 19:47:35 +0000 Subject: [PATCH] agent: don't receive signals from stdin close stdin to avoid agent be killed through the stdin fixes #746 Signed-off-by: Julio Montes --- agent.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/agent.go b/agent.go index 336e55618..6e7ff0b17 100644 --- a/agent.go +++ b/agent.go @@ -1445,6 +1445,11 @@ func init() { } panic("--this line should have never been executed, congratulations--") } + + // agent won't receive anything from the stdin. + // Close stdin to avoid the agent receives signals + // (ctrl + c/d) from the stdin. + os.Stdin.Close() } func realMain() error {