Linux DTrace development list
 help / color / mirror / Atom feed
* [PATCH 1/2] dtprobed: handle a crashed parser child better
@ 2025-01-16 21:33 Nick Alcock
  2025-01-16 21:33 ` [PATCH 2/2] libcommon: turn off FORTIFY_SOURCE more aggressively Nick Alcock
  2025-01-16 22:08 ` [DTrace-devel] [PATCH 1/2] dtprobed: handle a crashed parser child better Kris Van Hees
  0 siblings, 2 replies; 4+ messages in thread
From: Nick Alcock @ 2025-01-16 21:33 UTC (permalink / raw)
  To: dtrace, dtrace-devel

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@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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-01-16 22:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-16 21:33 [PATCH 1/2] dtprobed: handle a crashed parser child better Nick Alcock
2025-01-16 21:33 ` [PATCH 2/2] libcommon: turn off FORTIFY_SOURCE more aggressively Nick Alcock
2025-01-16 22:09   ` Kris Van Hees
2025-01-16 22:08 ` [DTrace-devel] [PATCH 1/2] dtprobed: handle a crashed parser child better Kris Van Hees

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox