Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
agent: don't receive signals from stdin
Browse files Browse the repository at this point in the history
close stdin to avoid agent be killed through the stdin

fixes #746

Signed-off-by: Julio Montes <[email protected]>
  • Loading branch information
Julio Montes committed Feb 21, 2020
1 parent d26a505 commit e4c2037
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit e4c2037

Please sign in to comment.