kubo/cmd
Tor Arne Vestbø 00a6e595ba main: wait for interrupt to finish before ending command invocation
If a command invocation such as 'daemon' is interrupted, the interrupt
handler asks the node to close. The closing of the node will result in
the command invocation finishing, and possibly returning from main()
before the interrupt handler is done. In particular, the info logging
that a graceful shutdown was completed may never reach reach stdout.

As the whole point of logging "Gracefully shut down." is to give
confidence when debugging that the shutdown was clean, this is
slightly unfortunate.

The interrupt handler needs to be set up in main() instead of Run(),
so that we can defer the closing of the interrupt handler until just
before returning from main, not when Run() returns with a streaming
result reader.
2015-04-20 16:35:30 +02:00
..
ipfs main: wait for interrupt to finish before ending command invocation 2015-04-20 16:35:30 +02:00
ipfs_bootstrapd Reorged imports from jbenet/go-ipfs to ipfs/go-ipfs 2015-03-31 12:52:25 -07:00
ipfs_routingd Reorged imports from jbenet/go-ipfs to ipfs/go-ipfs 2015-03-31 12:52:25 -07:00
ipfswatch Reorged imports from jbenet/go-ipfs to ipfs/go-ipfs 2015-03-31 12:52:25 -07:00
seccat Reorged imports from jbenet/go-ipfs to ipfs/go-ipfs 2015-03-31 12:52:25 -07:00