-
Notifications
You must be signed in to change notification settings - Fork 631
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
Foreman does not terminate child processes #628
Comments
With the following edited Procfile the problem does not seem to happen, but I have no idea why, aside from the fact tha I tried to eliminate as many characters referenced in #94 as possible:
|
Would it be possible to put together a small Procfile that demonstrates the problem? |
I'm trying to make it smaller, although I'm going randomly as I have no idea what the problem might be. One thing I have noticed: if foreman kills processes and prints this:
Then it means that it really killed the processes. When it prints that it terminates them by SIGTERM then it fails. I'll keep doing experiments trying to make a Procfile which reproduces the problem in the meantime, but maybe this can be a hint to something? |
By using watch, I have noticed that in those cases the process that foreman actually starts is this:
So what happens is that it kills sh but not the underlying process, which remains up (and with a different PID)
I'm trying to reproduce it with smaller programs so that you can reproduce it but I can't seem to. However I have reduced the procfile, this happens with:
It seems that with SIGINT the underlying sh is able to manage killing the child process, while with SIGTERM it does not happen. |
Reproduced. Make two programs:
Compile them.
Make Procfile:
Launch foreman:
Process remains:
|
(Note that the arguments are not needed, without them it works fine, but I guess you invoke "sh" only when there are special characters?) |
Same (?) thing here, when I exit foreman with Ctrl+C, all child processes get killed off nicely, when foreman exits because one of the child apps exploded, then it writes it stopped the children, but it doesn't. I'm using foreman 0.82.0 with ruby 2.2.4p230 |
I believe this should not be happening in the latest foreman. Please comment here if you're still seeing this. |
This is probably some kind of duplicate of #94, but I tried looking around for this and I could not find anything. The problem happened with foreman cloned and installed just now, with Ruby 2.3.0.
My Procfile is this:
After sending Ctrl-C to foreman, it prints that all processes have been terminated:
But they remain in processes..
The text was updated successfully, but these errors were encountered: