mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-17 16:26:59 +00:00
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:
parent
97e5b59b78
commit
3ef5d6c07f
4 changed files with 39 additions and 4 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue