[DTrace-devel] [PATCH 1/2] dtprobed: handle a crashed parser child better
Nick Alcock
nick.alcock at oracle.com
Thu Jan 16 21:33:31 UTC 2025
When a parser child crashes and is restarted, its file handles
might change: we should pick up the new fhes if so.
Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
---
dtprobed/dtprobed.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/dtprobed/dtprobed.c b/dtprobed/dtprobed.c
index 86865eb467b67..c0597b7329d37 100644
--- a/dtprobed/dtprobed.c
+++ b/dtprobed/dtprobed.c
@@ -769,7 +769,13 @@ process_dof(pid_t pid, int out, int in, dev_t dev, ino_t inum, dev_t exec_dev,
if (!provider) {
if (tries++ > 1)
goto err;
+ /*
+ * Tidying reopens the parser in and out pipes: catch
+ * up with this.
+ */
dof_parser_tidy(1);
+ out = parser_out_pipe;
+ in = parser_in_pipe;
continue;
}
if (provider->type != DIT_PROVIDER && provider->type != DIT_EOF)
--
2.47.1.279.g84c5f4e78e
More information about the DTrace-devel
mailing list