[PATCH] llm: fix newline escape in the SKILL.md script skeleton
Zhan Xusheng <[email protected]>
| Newsgroups | dev.linux.lists.dtrace |
|---|---|
| Message-ID | <[email protected]> |
The skeleton's BEGIN and ERROR clauses use "\\n" where "\n" is meant. In a D string literal that is an escaped backslash followed by 'n', so printf() emits a stray backslash instead of a newline. Agents copy the skeleton verbatim, and "\\n" is a valid literal, so the 'dtrace -e' check prescribed in the same file does not catch it. Every other D snippet in the tree uses a single backslash. Assisted-by: Kiro:claude-opus-4.8 Signed-off-by: Zhan Xusheng <[email protected]> --- Not tested under DTrace; this is purely a string-literal escape. Applies to devel (30c9c22). One thing I left alone: the skeleton's ERROR clause prints probeprov/ probemod/probefunc/probename, but those describe the probe that is currently firing, which inside an ERROR clause is dtrace:::ERROR itself rather than the probe that faulted. doc/userguide/reference/dtrace_providers_dtrace.md gives the culprit as arg1 (its EPID) and the fault type as arg4, and examples/language_features/001intro-ERROR-probe.d sidesteps this by printing a static message. Should the skeleton use arg1/arg4? Also minor: the "Target one process" pattern needs -p PID or -c CMD, which the suggested "sudo dtrace -s script.d" does not provide. llm/SKILL.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llm/SKILL.md b/llm/SKILL.md index e5e2f3e..a6ff502 100644 --- a/llm/SKILL.md +++ b/llm/SKILL.md @@ -66,7 +66,7 @@ probe-descriptions dtrace:::BEGIN { - printf("Tracing started...\\n"); + printf("Tracing started...\n"); } /* tracing clauses */ @@ -78,7 +78,7 @@ dtrace:::END dtrace:::ERROR { - printf("DTrace error at %s:%s:%s:%s\\n", probeprov, probemod, probefunc, probename); + printf("DTrace error at %s:%s:%s:%s\n", probeprov, probemod, probefunc, probename); } ``` -- 2.43.0