Commit Graph

5 Commits (57604d13cd7e9985e520511efc5b3b3b3dd62000)

Author SHA1 Message Date
David McMahon ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Ben Parees 936650d1ab make interrupt default exit with rc=1 and handle SIGHUP 2016-05-02 09:59:27 -04:00
Rodolfo Carvalho 9576f71b9a Unify termination signal handling across platforms
- All supported platforms can handle the same set of signals we're
  interested in, thus we don't need build contraints to use a set of
  signals on Linux, while restricting ourselves to only SIGINT on Darwin
  and Windows.
- According to the documentation of os/signal, similar to SIGINT and
  SIGTERM, SIGHUP causes the program to exit, therefore add it to the
  list of handled signals.

Signed-off-by: Rodolfo Carvalho <rcarvalh@redhat.com>
2016-04-28 15:35:50 +02:00
Clayton Coleman de6e02d8bb interrupt package (attach and edit) could leak a goroutine
os/signal.Stop() does not actually close the channel, which means
the channel is blocked. Not serious because we don't use interrupt
protection on the server, just the CLI (which can afford 1 leaked
goroutine).
2016-03-31 11:39:08 -04:00
Clayton Coleman 3a29e3971b Improve terminal reuse and attach
Currently attach and the editor do not share the same logic for saving
and restoring the terminal, and are not suitable for nesting (when the
caller wants to create something, attach, and then delete something when
the attach is over).  This commit moves the interrupt protection logic
to a util package and supports nesting interrupt handlers.
2016-03-21 23:59:58 -04:00