-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
add pretty process name #433
Conversation
|
@@ -271,6 +271,8 @@ def run(background=true) | |||
else | |||
handle_servers | |||
end | |||
|
|||
$0 = name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's probably not best to set $0 here. It should be done inside cli.rb instead, since Server can be embedded in another program and we shouldn't mess with their $0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if we use Process.setproctitle
if the target is running Ruby 2.1.0 or above?
It's been 24 days, no update. Are you able to continue working on this PR? |
i moved the code inside CLI, please take a look |
else | ||
Process.setproctitle process_title | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could make this a bit simpler
Process.respond_to?(:setproctitle) ? Process.setproctitle(process_title) : $0 = process_title
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure! updated commit
Thanks for making changes i'm 👍 on this functionality |
❤️ 😍 |
Hi, I'm new to Puma, looks great so far :)
I noticed the lack of a pretty process name, this is my attempt to add a simple (static) one, very similar to what Thin server does.
This also accepts an optional --tag parameter for additional text (useful to recognize different apps)
fixes #415