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

using pipe in command results in SIGTERM not being sent #37

Open
kilianc opened this issue Dec 21, 2014 · 3 comments
Open

using pipe in command results in SIGTERM not being sent #37

kilianc opened this issue Dec 21, 2014 · 3 comments

Comments

@kilianc
Copy link
Contributor

kilianc commented Dec 21, 2014

related to #36

I have something like "node server.js | rtail --id api-dev" as mon command and SIGTERM never gets to the node process.

@marcbachmann
Copy link

It would be awesome if this works.
This works:

$ mon "docker run -i ubuntu /bin/bash" --pidfile ubuntu.pid --mon-pidfile mon.pid
$ kill -TERM $(cat mon.pid)

But this isn't working:

$ mon "docker run -it -p 9200:9200 -p 9300:9300 digitalwonderland/elasticsearch" --pidfile elastic.pid --mon-pidfile mon.pid
$ kill -TERM $(cat mon.pid)

@kilianc
Copy link
Contributor Author

kilianc commented May 17, 2015

I think this may be related to a missing pipefail option. I probably need to use bash -c -o pipefail "node server.js | rtail --id api-dev" to make it work

@marcbachmann
Copy link

Yes. In both cases the SIGTERM signal isn't handled. Nearly the same problem I have with docker.

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

No branches or pull requests

2 participants