- New option: --mountpoint. If this option is given, dss aborts if
no file system is mounted on the destination directory.
+ - New option --checksum to let rsync compute checksums occasionally.
+
- The --no-resume option has been removed.
- The ls subcommand now shows the age of incomplete snapshots rather
than 0:00.
- - New option --checksum to let rsync compute checksums occasionally.
-
- In run mode, dss no longer exits successfully if another instance
is already running.
- - "make install" will install the executable and the man page.
+ - The command specified as the argument to --exit-hook is now subject
+ to word splitting. Previously, the string was executed as-is.
- Improved error diagnostics for the kill subcommand.
- For all subcommands other than "run", timestamps and function names
are omitted from the log output.
+ - "make install" will install the executable and the man page.
+
- CFLAGS, CPPFLAGS and LDFLAGS can now be used to override the flags
of the build system.
static void exit_hook(int exit_code)
{
- const char *argv[3];
pid_t pid;
-
- argv[0] = OPT_STRING_VAL(DSS, EXIT_HOOK);
- argv[1] = dss_strerror(-exit_code);
- argv[2] = NULL;
-
- DSS_NOTICE_LOG(("executing %s %s\n", argv[0], argv[1]));
- dss_exec(&pid, argv[0], (char **)argv);
+ char **argv, *tmp = dss_strdup(OPT_STRING_VAL(DSS, EXIT_HOOK));
+ unsigned n = split_args(tmp, &argv, " \t");
+
+ n++;
+ argv = dss_realloc(argv, (n + 1) * sizeof(char *));
+ argv[n - 1] = dss_strdup(dss_strerror(-exit_code));
+ argv[n] = NULL;
+ dss_exec(&pid, argv[0], argv);
+ free(argv[n - 1]);
+ free(argv);
+ free(tmp);
}
static void lock_dss_or_die(void)