[ Alexandre Viau ]
[ Debian Janitor ]
New upstream snapshot.
Debian Janitor
2 years ago
|
0 |
# Cf. http://docs.travis-ci.com/user/getting-started/
|
|
1 |
# Cf. http://docs.travis-ci.com/user/languages/go/
|
|
2 |
|
|
3 |
language: go
|
0 | |
golang-github-jacobsa-util (0.0~git20150504-3) UNRELEASED; urgency=medium
|
|
0 |
golang-github-jacobsa-util (0.0~git20150810-1) UNRELEASED; urgency=medium
|
1 | 1 |
|
|
2 |
[ Alexandre Viau ]
|
2 | 3 |
* Point Vcs-* urls to salsa.debian.org.
|
3 | 4 |
|
4 | |
-- Alexandre Viau <aviau@debian.org> Mon, 02 Apr 2018 18:06:55 -0400
|
|
5 |
[ Debian Janitor ]
|
|
6 |
* New upstream snapshot.
|
|
7 |
|
|
8 |
-- Alexandre Viau <aviau@debian.org> Tue, 28 Sep 2021 03:41:21 -0000
|
5 | 9 |
|
6 | 10 |
golang-github-jacobsa-util (0.0~git20150504-2) unstable; urgency=medium
|
7 | 11 |
|
47 | 47 |
}
|
48 | 48 |
|
49 | 49 |
// A handler for SIGINT that calls the supplied function before terminating.
|
|
50 |
// Returns if the channel is closed.
|
50 | 51 |
func handleInterrupt(c <-chan os.Signal, f func()) {
|
51 | |
// Wait for a signal.
|
52 | |
<-c
|
53 | |
f()
|
|
52 |
for range c {
|
|
53 |
f()
|
54 | 54 |
|
55 | |
// c.f. http://stackoverflow.com/questions/1101957/are-there-any-standard-exit-status-codes-in-linux
|
56 | |
os.Exit(-1)
|
|
55 |
// c.f. http://stackoverflow.com/questions/1101957/are-there-any-standard-exit-status-codes-in-linux
|
|
56 |
os.Exit(-1)
|
|
57 |
}
|
57 | 58 |
}
|
58 | 59 |
|
59 | 60 |
// Read a password from the terminal without echoing it. No space is added
|
|
79 | 80 |
// we're done because there is no way to re-enable the default signal
|
80 | 81 |
// handler.
|
81 | 82 |
signalChan := make(chan os.Signal)
|
|
83 |
defer close(signalChan)
|
|
84 |
|
82 | 85 |
go handleInterrupt(signalChan, restore)
|
|
86 |
|
83 | 87 |
signal.Notify(signalChan, os.Interrupt)
|
|
88 |
defer signal.Stop(signalChan)
|
84 | 89 |
|
85 | 90 |
// Disable echoing.
|
86 | 91 |
newTermSettings := origTermSettings
|