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 <git@frezbo.dev>
(cherry picked from commit 62d1854)
  • Loading branch information
frezbo authored and smira committed Oct 25, 2024
1 parent 0e96e99 commit e105a3d
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 e105a3d

Please sign in to comment.