Skip to content

DAOS-18563 control: Find parent process name more flexibly#17494

Open
mjmac wants to merge 1 commit intomasterfrom
mjmac/DAOS-18563
Open

DAOS-18563 control: Find parent process name more flexibly#17494
mjmac wants to merge 1 commit intomasterfrom
mjmac/DAOS-18563

Conversation

@mjmac
Copy link
Contributor

@mjmac mjmac commented Feb 3, 2026

In some cases, it's more reliable to get the process name from
/proc/$pid/comm, so prefer that with a fallback to the old method
of using readlink on /proc/$pid/exe.

Signed-off-by: Michael MacDonald github@macdonald.cx

@github-actions
Copy link

github-actions bot commented Feb 3, 2026

Ticket title is 'Check /proc/pid/comm first when getting process name'
Status is 'In Review'
https://daosio.atlassian.net/browse/DAOS-18563

@daosbuild3
Copy link
Collaborator

@daosbuild3
Copy link
Collaborator

@daosbuild3
Copy link
Collaborator

In some cases, it's more reliable to get the process name from
/proc/$pid/comm, so prefer that with a fallback to the old method
of using readlink on /proc/$pid/exe.

Signed-off-by: Michael MacDonald <github@macdonald.cx>
@mjmac mjmac marked this pull request as ready for review February 13, 2026 18:01
@mjmac mjmac requested review from a team as code owners February 13, 2026 18:01
@mjmac mjmac requested a review from kjacque February 13, 2026 18:01
Copy link
Contributor

@kjacque kjacque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, comment is just a suggestion.

}

return filepath.Base(pPath), nil
return string(data[:len(data)-1]), nil // trim trailing newline
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could use strings.Trim which might eliminate the need for the comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants