/* Remove any -d options from an argument vector. */
static int filter_daemonize_argv(char **argv)
/* Remove any -d options from an argument vector. */
static int filter_daemonize_argv(char **argv)
{
    int ret = 0;
    for (char **narg = argv; *narg != NULL; narg++) {
        if (strcmp("-d", narg[0]) == 0) {
            ret = 1;
            char **xarg = narg;
            do {
                xarg[0] = xarg[1];
            } while (*xarg++ != NULL);
            narg--;
        }
    }
    return ret;
}