Re: [PATCH v5 10/30] fsmonitor--daemon: implement 'run' command
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Feb 17, 2022, 16:46 UTC
- Message-ID
- <nycvar.QRO.7.76.6.2202171744410.348@tvgsbejvaqbjf.bet>
- In-Reply-To
- <6fe5a2bc79eec132b6455d53196906036d0f4a80.1644612979.git.gitgitgadget@gmail.com>
Hi Jeff,
On Fri, 11 Feb 2022, Jeff Hostetler via GitGitGadget wrote:
Show 17 quoted lines
> +static int try_to_run_foreground_daemon(void)
> +{
> + /*
> + * Technically, we don't need to probe for an existing daemon
> + * process, since we could just call `fsmonitor_run_daemon()`
> + * and let it fail if the pipe/socket is busy.
> + *
> + * However, this method gives us a nicer error message for a
> + * common error case.
> + */
> + if (fsmonitor_ipc__get_state() == IPC_STATE__LISTENING)
> + die("fsmonitor--daemon is already running '%s'",
> + the_repository->worktree);
> +
> + printf(_("running fsmonitor-daemon in '%s'\n"),
> + the_repository->worktree);
> + fflush(stdout);Do we want to print this to `stderr` instead?
Ciao, Dscho