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

Improve zombie_killer compatability #111

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

grantwest
Copy link
Contributor

@grantwest grantwest commented Nov 6, 2019

Problem:

  • Combination of zombie_killer and test command quotes are causing
    the unit tests to not run

Solution:

  • Remove use of exec in sh script because it is being used incorrectly
  • Change command quoting to match what is conventionally used with sh -c

Fixes #110

Problem:
- Combination of zombie_killer and test command quotes are causing
  the unit tests to not run

Solution:
- Remove use of exec in sh script because it is being used incorrectly
- Change command quoting to match what is conventionally used with sh -c
@rjdellecese
Copy link
Contributor

When I run this version of the script on MacOS it works (the tests run), but it re-raises the issue that #106 was intended to address—that is, it doesn't kill the test process when the watcher is killed. I can see this happen when I run mix test.watch on a test suite that runs for about 20s, killing the watcher with Ctrl-C, and then running ps -ef | grep mix.

I don't think I understand the issue arising from using read with no args (though I'm no shell scripting expert), and I wasn't able to reproduce it on my version of sh on my machine, but when I run the script with only the while read UNUSED; do :; done change, it still works for me. Does that solve the problem you were running into?

Another possibility would just be replacing #!/usr/sh with #!/usr/bash—I know that technically sh is more portable than bash, but what *nix system doesn't have bash? Maybe bash would still be portable enough?

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.

zombie_killer not executing correctly
2 participants