#include "compiler.h"
#include "dirs.h"
#include "dynamic-string.h"
+#include "fatal-signal.h"
#include "file.h"
#include "lockfile.h"
#include "log.h"
static const struct command *get_all_commands(void);
-static void usage(void) NO_RETURN;
+NO_RETURN static void usage(void);
static void parse_options(int argc, char *argv[]);
static const char *default_db(void);
{
set_program_name(argv[0]);
parse_options(argc, argv);
- signal(SIGPIPE, SIG_IGN);
+ fatal_ignore_sigpipe();
run_command(argc - optind, argv + optind, get_all_commands());
return 0;
}
/* Replace source. */
if (in_place) {
+#ifdef _WIN32
+ unlink(src_name);
+#endif
if (rename(dst_name, src_name)) {
ovs_fatal(errno, "failed to rename \"%s\" to \"%s\"",
dst_name, src_name);