summaryrefslogtreecommitdiff
path: root/trace2.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-10-13 22:15:57 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-10-13 22:15:58 (GMT)
commitaf303ee39214a04ad3c01e5924f2e8c09b5c18cb (patch)
treea11254d63d48bb387ed4bdd3927568d9ff9e0276 /trace2.h
parenta5e61a4225a7319ab5fdd6d7b63e250f5b08255c (diff)
parent05881a6fc9020b5c227a98490bf256d129da01f6 (diff)
downloadgit-af303ee39214a04ad3c01e5924f2e8c09b5c18cb.zip
git-af303ee39214a04ad3c01e5924f2e8c09b5c18cb.tar.gz
git-af303ee39214a04ad3c01e5924f2e8c09b5c18cb.tar.bz2
Merge branch 'jh/builtin-fsmonitor-part1'
Built-in fsmonitor (part 1). * jh/builtin-fsmonitor-part1: t/helper/simple-ipc: convert test-simple-ipc to use start_bg_command run-command: create start_bg_command simple-ipc/ipc-win32: add Windows ACL to named pipe simple-ipc/ipc-win32: add trace2 debugging simple-ipc: move definition of ipc_active_state outside of ifdef simple-ipc: preparations for supporting binary messages. trace2: add trace2_child_ready() to report on background children
Diffstat (limited to 'trace2.h')
-rw-r--r--trace2.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/trace2.h b/trace2.h
index 2f450ab..0cc7b5f 100644
--- a/trace2.h
+++ b/trace2.h
@@ -254,6 +254,31 @@ void trace2_child_exit_fl(const char *file, int line, struct child_process *cmd,
trace2_child_exit_fl(__FILE__, __LINE__, (cmd), (code))
/**
+ * Emits a "child_ready" message containing the "child-id" and a flag
+ * indicating whether the child was considered "ready" when we
+ * released it.
+ *
+ * This function should be called after starting a daemon process in
+ * the background (and after giving it sufficient time to boot
+ * up) to indicate that we no longer control or own it.
+ *
+ * The "ready" argument should contain one of { "ready", "timeout",
+ * "error" } to indicate the state of the running daemon when we
+ * released it.
+ *
+ * If the daemon process fails to start or it exits or is terminated
+ * while we are still waiting for it, the caller should emit a
+ * regular "child_exit" to report the normal process exit information.
+ *
+ */
+void trace2_child_ready_fl(const char *file, int line,
+ struct child_process *cmd,
+ const char *ready);
+
+#define trace2_child_ready(cmd, ready) \
+ trace2_child_ready_fl(__FILE__, __LINE__, (cmd), (ready))
+
+/**
* Emit an 'exec' event prior to calling one of exec(), execv(),
* execvp(), and etc. On Unix-derived systems, this will be the
* last event emitted for the current process, unless the exec