-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 is ignored when process has no TTY #2019
Comments
I can confirm this.
or
Will see if this can be fixed in Rocket or it is a problem in tokio::signal. |
@darakian Does Rocket successful service requests in this detached state? It panics in trying to |
Mmh... with this pull in the year 2015 print/println shouldn't panic, only if stdout is requested somehow via But it is documented that it will panic, for println!:
|
sorry. shot too fast... I'd tested it with redirecting the output ;-) |
It panics at
log.rs:118 is official this https://github.com/SergioBenitez/Rocket/blob/8cae077ba1d54b92cdef3e171a730b819d5eeb8e/core/lib/src/log.rs#L104 I've replaced this println! with What are the print-macros doing here? Do they cache somewhere stdout? |
I don't have an explanation why the rust std print macros panic, but this fixes rwf2#2019 Tested with and without redirecting. Log output looks like usual.
It does. The only noticeable behavior has been that I needed to alter a control script. Thanks for digging into this, it was a fascinating read! |
Description
Ran into an issue killing a rocket process and tracked it down to a missing tty. SIGKILL still kills the process, but a graceful shutdown would be nice even when missing a tty. SIGQUIT works as expected.
To Reproduce
Launch a rocket web server as a background process then log out the active user.
Expected Behavior
The root user (or other management users) should be able to kill the process using the kill command as
kill <pid>
rather than needed to specify SIGQUIT.Environment:
4.18.0-269.el8.x86_64
0.5.0-rc.1
via crates.ioAdditional Context
Launch config
The text was updated successfully, but these errors were encountered: