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

Local Process Manager shouldn't error if process not found #241

Closed
acburdine opened this issue Jun 27, 2017 · 4 comments
Closed

Local Process Manager shouldn't error if process not found #241

acburdine opened this issue Jun 27, 2017 · 4 comments
Labels

Comments

@acburdine
Copy link
Member

The local process manager uses fkill to handle killing of the Ghost process. When it was first built, a check was programmed in to not throw an error if the process didn't exist.

Somewhere in dependency updates the format of the error message returned from fkill was changed, so we need to update this line to handle the new error format.

@acburdine
Copy link
Member Author

Update: After some investigation the error message format hasn't changed - it might be something to do with the operating system. On Mac the error message is correct, but on linux it's probably different.

@acburdine
Copy link
Member Author

Looking into this further plus dialogue with some on Slack seems to point this to a problem with the user not being able to stop processes (e.g. in a docker container). Going to leave this open, but moving it to a post-1.0 issue as I think it's ok for the time being.

If it gets reported more, then this can be made a priority again.

@acburdine acburdine removed this from the 1.0.0-rc.1 milestone Jul 3, 2017
@acburdine acburdine removed their assignment Jul 3, 2017
@acburdine
Copy link
Member Author

Going to close this for now - even if the error messages are different the 'is running' feature of the process managers should have fixed this. I tested on different systems and couldn't get this issue to re-occur as it's been reported by others on slack. If this issue occurs more then it can be re-opened.

@badrihippo
Copy link

@acburdine looks like I've run into this error again on Ubuntu! When ghost is force-closed, then next time it reopens it fails with uncaught exception "Process doesn't exist". It's because Ghost expects it to be framed as "No such process" instead.

I fixed by changing a line in lib/utils/local-process.js:

            // TODO: verify windows outputs same error message as mac/linux
            if (!error.message.match(/No such process/)) {

becomes

            // TODO: verify windows outputs same error message as mac/linux
            if (!error.message.match(/No such process|Process doesn't exist/)) {

Not sure if this is specific to my setup (Ubuntu 18.04 Bionic) or generic to all/many Linux/Unix machines. Should it be looked into?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants