diff options
Diffstat (limited to 'builtin/fsmonitor--daemon.c')
-rw-r--r-- | builtin/fsmonitor--daemon.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/builtin/fsmonitor--daemon.c b/builtin/fsmonitor--daemon.c index 6f30a4f93a..f6dd9a784c 100644 --- a/builtin/fsmonitor--daemon.c +++ b/builtin/fsmonitor--daemon.c @@ -1,5 +1,9 @@ #include "builtin.h" +#include "abspath.h" +#include "alloc.h" #include "config.h" +#include "environment.h" +#include "gettext.h" #include "parse-options.h" #include "fsmonitor.h" #include "fsmonitor-ipc.h" @@ -10,6 +14,7 @@ #include "simple-ipc.h" #include "khash.h" #include "pkt-line.h" +#include "trace2.h" static const char * const builtin_fsmonitor__daemon_usage[] = { N_("git fsmonitor--daemon start [<options>]"), @@ -710,6 +715,7 @@ static int do_handle_client(struct fsmonitor_daemon_state *state, "fsmonitor: unsupported V1 protocol '%s'"), command); do_trivial = 1; + do_cookie = 1; } else { /* We have "builtin:*" */ @@ -719,6 +725,7 @@ static int do_handle_client(struct fsmonitor_daemon_state *state, "fsmonitor: invalid V2 protocol token '%s'", command); do_trivial = 1; + do_cookie = 1; } else { /* @@ -1209,7 +1216,7 @@ static int fsmonitor_run_daemon_1(struct fsmonitor_daemon_state *state) * events. */ if (pthread_create(&state->listener_thread, NULL, - fsm_listen__thread_proc, state) < 0) { + fsm_listen__thread_proc, state)) { ipc_server_stop_async(state->ipc_server_data); err = error(_("could not start fsmonitor listener thread")); goto cleanup; @@ -1220,7 +1227,7 @@ static int fsmonitor_run_daemon_1(struct fsmonitor_daemon_state *state) * Start the health thread to watch over our process. */ if (pthread_create(&state->health_thread, NULL, - fsm_health__thread_proc, state) < 0) { + fsm_health__thread_proc, state)) { ipc_server_stop_async(state->ipc_server_data); err = error(_("could not start fsmonitor health thread")); goto cleanup; @@ -1572,7 +1579,7 @@ int cmd_fsmonitor__daemon(int argc, const char **argv, const char *prefix) } #else -int cmd_fsmonitor__daemon(int argc, const char **argv, const char *prefix) +int cmd_fsmonitor__daemon(int argc, const char **argv, const char *prefix UNUSED) { struct option options[] = { OPT_END() |