jbenet/go-ipfs — pull request #351 by jbenet (2014-11-16 10:26:46+00:00)
Title: Mount, Daemon, and Signal Handler Fixes

This PR:

1. mount: fixed mount init + teardown
This commit adds a Mount abstraction (which is really just a wrapped
context closer). It makes sure to bind the mount to the fate of the Node
(i.e. close it if the node ends). This fixes #350

2. mount: if already mounted, unmount before new attempt
This is because if the user specifies that they want to mount multiple
times, something must be wrong. try unmounting to reset things and then
proceed.

3. improve how the signal handler works (attempt to shutdown node)