Skip to content

Conversation

Copy link

Copilot AI commented Jan 28, 2026

The .init script creates a temp file with mktemp, appends .o to the variable, then only removes the .o file—leaving the original mktemp file orphaned in /tmp.

Changes:

  • Use mktemp --suffix=.o to create the file with the extension atomically

Before:

ASM=$(mktemp).o  # Creates /tmp/tmp.abc123, assigns /tmp/tmp.abc123.o
rm $ASM          # Removes /tmp/tmp.abc123.o, orphans /tmp/tmp.abc123

After:

ASM=$(mktemp --suffix=.o)  # Creates /tmp/tmp.abc123.o directly
rm $ASM                     # Removes /tmp/tmp.abc123.o completely
Original prompt

This section details on the original issue you should resolve

<issue_title>mktemp residue in "Tracing Syscalls" build script</issue_title>
<issue_description>In the .init script for Tracing Syscalls, mktemp leaves an orphaned file in /tmp:

ASM=$(mktemp).o
...
rm $ASM

The rm command only targets the .o file, leaving the original empty file created by mktemp behind. Is this intentional?

Proposed Fix:
ASM=$(mktemp --suffix=.o)</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: zardus <3453847+zardus@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix mktemp residue in Tracing Syscalls build script Fix mktemp orphaned file in strace .init script Jan 28, 2026
Copilot AI requested a review from zardus January 28, 2026 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mktemp residue in "Tracing Syscalls" build script

2 participants