Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[$100 bounty] Remove setproctitle dependency #32660

Closed
adeebshihadeh opened this issue Jun 8, 2024 · 3 comments · Fixed by #32667
Closed

[$100 bounty] Remove setproctitle dependency #32660

adeebshihadeh opened this issue Jun 8, 2024 · 3 comments · Fixed by #32667

Comments

@adeebshihadeh
Copy link
Contributor

Replace setproctitle with our own small helper in common/. Just needs to work on Linux.

@markypizz
Copy link

Curious if I'm trending in the right direction. Thanks!
#32666

@jyoung8607
Copy link
Collaborator

jyoung8607 commented Jun 10, 2024

Truly replacing Linux setproctitle() requires clobbering the original argv[], which is some real sausage-making. However, @cl0cks4fe has taken a shot in #32691.

The other approaches are setting a thread title. htop doesn't show them because it's configured not to. IMO we should fix the htop config, because then we'll actually start seeing see the thread names we're already setting in camerad, loggerd, and boardd. Then we can migrate setproctitle() users to setting thread titles, and dispose of the dependency that way.

@markypizz
Copy link

Agreed with the above. htop is looking at /proc/{pid}/cmdline, which can't be changed other than clobbering argv and the mess associated with it. Is the setting of the title purely for cosmetics or for some other reason?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants