-
Notifications
You must be signed in to change notification settings - Fork 2
PR: Use a more fine-grained name to detect if Spyder is running #14
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
Conversation
|
Hmm... on macOS |
|
Perhaps we should use then |
Okay, I think we can just use and |
|
|
||
| wait_for_spyder_quit(){ | ||
| while [[ $(pgrep spyder 2> /dev/null) ]]; do | ||
| while [[ $(pgrep spyder-runtime 2> /dev/null) ]]; do |
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.
| while [[ $(pgrep spyder-runtime 2> /dev/null) ]]; do | |
| while [[ $(pgrep -f spyder-runtime 2> /dev/null) ]]; do |
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.
I think if we add the -f flag, then it will search the entire command instead of just the process name, so it should work for both macOS and Linux. This seemed to work for me on macOS; I could isolate and distinguish between Spyder and Spyder updater.
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.
Sorry, this fails for me on Linux (i.e. I get the same behavior as with pgrep spyder).
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.
However, this works, which I think it's better
| while [[ $(pgrep spyder-runtime 2> /dev/null) ]]; do | |
| while [[ $(pgrep -f spyder-runtime/bin 2> /dev/null) ]]; do |
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.
That's interesting; I wonder why /bin works but sans /bin does not? Anyway, this appears to work on macOS as well, so it should be good.
40ac7e5 to
5809a81
Compare
Right now we're using
pgrep spyderto check if Spyder is still running before starting the update.However, that matches the command used to run the updater on Linux, which in my case is:
And that makes the updater wait indefinitely for itself to be closed.
So, if we use
pgrep spyder-runtime, we shouldn't have this problem.