Thread (269 messages) 269 messages, 9 authors, 2022-03-28

Re: [PATCH v5 10/30] fsmonitor--daemon: implement 'run' command

From: Johannes Schindelin <hidden>
Date: 2022-02-24 15:31:16

Hi Jeff,

On Thu, 17 Feb 2022, Jeff Hostetler wrote:
On 2/17/22 11:46 AM, Johannes Schindelin wrote:
quoted
On Fri, 11 Feb 2022, Jeff Hostetler via GitGitGadget wrote:
quoted
+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?
Yes.  I have a patch in part 3 that moves it to stderr
and only emits it if a config setting is present.

fsmonitor--daemon: print start message only if fsmonitor.announceStartup

Wondering if I should squash that in here instead.
I would like that.

Thanks,
Dscho
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help