sys_cmd error handling improved.
authorRichard Kettlewell <rjk@terraraq.org.uk>
Mon, 11 Jul 2011 18:44:18 +0000 (19:44 +0100)
committerRichard Kettlewell <rjk@terraraq.org.uk>
Mon, 11 Jul 2011 18:55:56 +0000 (19:55 +0100)
commitbaab3a63ada033b2b9eed46807b2e88536612bbc
tree2445a27aff495ada0bcb0a3674fea13eee3c36b1
parentcd992ce2883c465d9e175f407d4a96f1eabacdb8
sys_cmd error handling improved.

(1) If the subprocess exits nonzero then the exit status
    is unpicked and logged.
(2) If the exec in the child fails, the command and
    errno string are written to stderr (which should
    end up in secnet's usual log output).
(3) _exit() is used instead of exit(), to avoid
    any possibility of craziness with stdio/atexit/etc.

Signed-off-by: Richard Kettlewell <rjk@terraraq.org.uk>
process.c