output: verify stream status when closing files

Includes also closing stdout and stderr at the end of execution.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
Sami Kerola 2012-03-22 21:35:25 +01:00
parent 97e5b59b78
commit 3ef5d6c07f
4 changed files with 39 additions and 4 deletions

View file

@ -77,6 +77,8 @@ int main(int argc, char **argv)
{NULL, 0, NULL, 0}
};
atexit(close_stdout);
/* FIXME: make these allocations dynamic up on need. */
config.dhcpdconf_file = safe_malloc(sizeof(char) * MAXLEN);
config.dhcpdlease_file = safe_malloc(sizeof(char) * MAXLEN);