]> git.itanic.dy.fi Git - rrdd/commit
process: Improve error handling
authorTimo Kokkonen <timo.t.kokkonen@iki.fi>
Sat, 14 Apr 2012 12:01:19 +0000 (15:01 +0300)
committerTimo Kokkonen <timo.t.kokkonen@iki.fi>
Sat, 14 Apr 2012 12:01:19 +0000 (15:01 +0300)
commitcbee3a4222f04d3936a17eedd65efe30b41b73cd
tree2b341cef9d01e4c16bc863066cf9a47311275262
parent552fb2e9094b3d6c0142d4b78b4199a945ae8242
process: Improve error handling

Check the error message from select(). If error, bail out.

Also close all file descriptors in the end. If select happends to fail
and we go to waitpid() and the process is writing content, it might
eventually block because nobody is reading the file descriptor. By
closing the file we ensure the process will not hang and there will be
no deadlock.

Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
process.c