-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Personal log doesn't work with --background #3455
Comments
Also of note from my tracing, the file gets created, everything makes it through all the way to the last Possibly related notes in libuv code: https://github.com/libuv/libuv/blob/v1.x/src/unix/async.c#L293 Perhaps instead of regular |
Found it, this patch works but I have less than zero clue if it's the ideal way to fix it. Seems like creating a new loop and not using the default one is more proper but that seems like a ton more work considering the at least 20 various calls to |
I can confirm PR works. |
Still lightly buggy in that when you send a kill to the backgrounded process it doesn't seem to execute the normal exit path, instead it simply dies. But it could be it just misses writing the last couple of lines to the log somehow (although it works fine and logs everything in foreground). Also that might not matter enough to hold up merging the PR. |
Wierd, i force kill -9 or pkill and logs seems exit normal not strange symbols or incomplete logs. Maybe i miss something but if you say still buggy then must be. |
When in foreground and you kill either with default signal or with |
A different patch that still fixes this, does not fix the signal behavior either, however it is cleaner and simpler. |
The actual problem was simply the construction of Signals before the fork, none of my ideas were really doing anything. |
And I think the logging is not related to Signals not being caught, but actually libuv not flushing the pending async write events before exiting (so it exits cleanly but doesn't flush the last couple lines to the logfile). |
Describe the bug
Personal log doesn't work with --background
To Reproduce
No logs in "my_log.log
If I delete "--background" the records appear in the terminal and in the "my_log.log"
Expected behavior
That the logs be saved in the custom log
my_log.log
and can use the--background
option, so that nothing appears in the consoleRequired data
Workaround
replace personal log with
--syslog
The text was updated successfully, but these errors were encountered: