Skip to content

Commit

Permalink
fix: talosctl process null character
Browse files Browse the repository at this point in the history
Fixes using grep on `talosctl ps` complaining about being a binary
output.

Signed-off-by: Noel Georgi <[email protected]>
  • Loading branch information
frezbo committed Oct 24, 2024
1 parent 77d7368 commit 62d1854
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/pkg/miniprocfs/processes.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ func (procs *Processes) readProc(pidString string) (*machine.ProcessInfo, error)
var label string

if err = procs.readFileIntoBuf(path + "attr/current"); err == nil {
label = string(bytes.TrimSpace(procs.buf))
label = string(bytes.Trim(procs.buf, "\x000\n"))
}

return &machine.ProcessInfo{
Expand Down

0 comments on commit 62d1854

Please sign in to comment.