-
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
SIGTERM not properly forwarded to node process #440
Comments
What version of foreman are you using? Some significant changes were just released in the last couple of days. |
Hmm, foreman was installed using a regular "gem install foreman"
returns 0.63.0. I'll try forcing an update and will update this issue accordingly. |
Okay, updated foreman to 0.66 - issue still remains exactly as described above. |
I did some testing and it looks like What are you trying to do in the signal handler? |
It seems like the signals are being forwarded but that Node is not able to display output if you process.exit() right afterwards. Try this script: https://gist.github.com/ddollar/cf9d3e01e2ba01750f79 |
Update : @ddollar has the correct analysis (see node issue nodejs/node-v0.x-archive#8329) but the link above is no longer usable (node 10.31 provides no flush on streams)
|
I wonder about this problem. The problem still holds. Here is my foreman output :
My node.js is not able to output anything. However, when I send SIGINT/SIGTERM directly to the node process (kill ) I correctly get the node output :
How can we explain this ? |
Since my tests involve Ctrl+C could it be related to #330 ? |
still an issue even on the latest version. when a process fails and SIGTERM is sent to the other node processes: I manually patched this by:
|
I observed the same behavior. Looking at the code Line 192 in 1445adc
EDIT: I was using outdated 0.78 verison |
It seems like foreman is not properly forwarding signals to a running node-process.
Processes are started by the following Procfile:
and starts as expected.
With the the Node-app, the following signal-trap is installed:
and is invoked as expected when running Node straight from the commandline (when bound on SIGINT). However, when running via foreman - no signal of any kind is propagated.
I've tried to read through the code for a hint but as far as I can see - the signals should be forwarded?
Testing was done on OS X 10.9.2
The text was updated successfully, but these errors were encountered: