mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-18 00:37:01 +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
|
|
@ -39,6 +39,7 @@
|
|||
#include <config.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
|
||||
/* Feature test switches */
|
||||
#define _POSIX_SOURCE 1
|
||||
|
|
@ -167,6 +168,8 @@ void *safe_malloc(const size_t size)
|
|||
void *safe_realloc(void *__restrict ptr, const size_t size);
|
||||
char *safe_strdup(const char *__restrict str) __attribute__ ((nonnull(1)));
|
||||
int xstrstr(char *__restrict a, char *__restrict b, int len);
|
||||
int close_stream(FILE * stream);
|
||||
void close_stdout(void);
|
||||
void print_version(void) __attribute__ ((noreturn));
|
||||
void usage(int status) __attribute__ ((noreturn));
|
||||
/* qsort required functions... */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue