-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Continue printing log output after Ctrl-C has been pressed #592
Comments
+1 |
1 similar comment
👍 |
Any update on this? |
Just ran into the same problem. Here is a minimal example to reproduce the issue: Here is a service (python in that example) that prints something on
import signal
import sys
import threading
def runner(stop_event):
while not stop_event.wait(1):
print('Hi.', flush=True)
stop_event = threading.Event()
def signal_handler(*_):
stop_event.set()
print('Bye.', flush=True)
sys.exit(0)
signal.signal(signal.SIGINT, signal_handler)
signal.signal(signal.SIGTERM, signal_handler)
runner_thread = threading.Thread(target=runner, args=(stop_event,))
runner_thread.start()
runner_thread.join() When running normally in the terminal and pressing CTRL+C, it works fine, i.e., the
However when running with Docker compose and CTRL+C-ing it,
Terminal interaction:
It would be really great if it could continue to print the log output instead. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically closed because it had not recent activity during the stale period. |
Oh, that's sad. For me, it's still an issue. |
Also having this problem. |
Still an issue for me as well. Makes it very difficult to determine whether cleanup behavior is happening correctly or not. |
This seems like a genuine omission, and is still tracked in #2227 . Can it be reopened? |
When I run
fig up
and hit Ctrl-C, the log output stops immediately. It'd be useful to keep on printing log output until the process stops.The text was updated successfully, but these errors were encountered: