New Upstream Snapshot - golang-github-jacobsa-util
Ready changes
Summary
Merged new upstream version: 0.0~git20150810 (was: 0.0~git20150504).
Resulting package
Built on 2022-10-31T05:20 (took 5m14s)
The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:
apt install -t fresh-snapshots golang-github-jacobsa-util-dev
Lintian Result
Diff
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..b972119
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,4 @@
+# Cf. http://docs.travis-ci.com/user/getting-started/
+# Cf. http://docs.travis-ci.com/user/languages/go/
+
+language: go
diff --git a/debian/changelog b/debian/changelog
index 7baca36..809c48f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,12 @@
-golang-github-jacobsa-util (0.0~git20150504-3) UNRELEASED; urgency=medium
+golang-github-jacobsa-util (0.0~git20150810-1) UNRELEASED; urgency=medium
+ [ Alexandre Viau ]
* Point Vcs-* urls to salsa.debian.org.
- -- Alexandre Viau <aviau@debian.org> Mon, 02 Apr 2018 18:06:55 -0400
+ [ Debian Janitor ]
+ * New upstream snapshot.
+
+ -- Alexandre Viau <aviau@debian.org> Mon, 31 Oct 2022 05:16:39 -0000
golang-github-jacobsa-util (0.0~git20150504-2) unstable; urgency=medium
diff --git a/password/password.go b/password/password.go
index 25089f4..d324262 100644
--- a/password/password.go
+++ b/password/password.go
@@ -48,13 +48,14 @@ func setTermSettings(settings C.struct_termios) {
}
// A handler for SIGINT that calls the supplied function before terminating.
+// Returns if the channel is closed.
func handleInterrupt(c <-chan os.Signal, f func()) {
- // Wait for a signal.
- <-c
- f()
+ for range c {
+ f()
- // c.f. http://stackoverflow.com/questions/1101957/are-there-any-standard-exit-status-codes-in-linux
- os.Exit(-1)
+ // c.f. http://stackoverflow.com/questions/1101957/are-there-any-standard-exit-status-codes-in-linux
+ os.Exit(-1)
+ }
}
// Read a password from the terminal without echoing it. No space is added
@@ -80,8 +81,12 @@ func ReadPassword(prompt string) string {
// we're done because there is no way to re-enable the default signal
// handler.
signalChan := make(chan os.Signal)
+ defer close(signalChan)
+
go handleInterrupt(signalChan, restore)
+
signal.Notify(signalChan, os.Interrupt)
+ defer signal.Stop(signalChan)
// Disable echoing.
newTermSettings := origTermSettings
Debdiff
File lists identical (after any substitutions)
No differences were encountered in the control files