upgraded: improve error handling
authorMatthias Schiffer <mschiffer@universe-factory.net>
Thu, 13 Jul 2017 11:18:00 +0000 (13:18 +0200)
committerMatthias Schiffer <mschiffer@universe-factory.net>
Thu, 13 Jul 2017 11:22:08 +0000 (13:22 +0200)
commit76dcbee7fd3a90221619feb7e4c572e00b60af9b
tree6f9e22af53de5af3607e774eface3ae3650f1c82
parentd749b2a3507517ff0fe39f7dac69f44ce20c56a2
upgraded: improve error handling

* exit with code 1 instead of unusual -1 in the parent process
* exit using _exit() when child exec fails
* fix fork/exec error messages
* only uloop_run() after successful child fork (uloop_end() before
  uloop_run() doesn't have any effect, so uloop_run() would hang forever)
* minor code cleanup

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
upgraded/upgraded.c