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

Check if tkellem is running first on tkellem start #32

Merged
merged 2 commits into from
Jun 22, 2013

Conversation

slottermoser
Copy link
Contributor

Make sure tkellem isn't already running when the user types
tkellem start. If it is running already, print out a relevent
message and exit instead of daemonizing another instance.

Fixes #31

Make sure tkellem isn't already running when the user types
tkellem start. If it is running already, print out a relevent
message and exit instead of daemonizing another instance.

Fixes codekitchen#31
@codekitchen
Copy link
Owner

thanks for this. just one stylistic comment.

@@ -137,6 +138,14 @@ def status(print = true)
pid.to_i > 0 ? pid.to_i : nil
end

def running?
Copy link
Owner

Choose a reason for hiding this comment

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

the convention in ruby is for question mark methods to return a boolean value. this method would be better named abort_if_running! or something of that nature.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're absolutely right. I had it returning a boolean, but changed it to just exit and forgot to rename the method. Thanks for pointing this out :)

Follow ruby naming convention. This method originally
returned a boolean, but I changed what the method did
and forgot to rename the method appropriately.
codekitchen added a commit that referenced this pull request Jun 22, 2013
Check if tkellem is running first on tkellem start
@codekitchen codekitchen merged commit dc0bceb into codekitchen:master Jun 22, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tkellem start does not protect against double start
2 participants