-
-
Notifications
You must be signed in to change notification settings - Fork 131
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
Dream.run: disable ~adjust_terminal behavior #336
Conversation
I'm actually thinking of removing that code entirely and having What do you think? |
This also caused a problem that was discussed on Discord recently and I've asked the people there, as well, though it's somewhat dead lately :) |
Truthfully, the truncation of long log lines has also bothered me a bit, and I didn't even know about |
Is the ReasonML channel the "official" channel? I didn't join that Discord and have only been active in the OCaml server, since I don't work with ReasonML. If other people feel the same way it might be a reason why it feels empty. |
Would you be willing to remove all this signal code, keep |
It's not exactly official, but it's the most Dream-specific one there is, so I and people have used it. |
I removed all the code related to However the Docker bug still occurs without the signal handlers. So I think it must be related to how Lwt does things. I have created a small reproduction of the issue here: https://github.com/maxrn/lwt_test |
The mystery deepens.
Many thanks! I am ready to merge this PR as removing |
One option would be to report this upstream to the Lwt repo, https://github.com/ocsigen/lwt, especially if you can get rid of the remaining usage of http/af. |
If you do, cc me on that issue. I might be able to help spot something during a discussion, as a former Lwt maintainer. |
I created an issue here: ocsigen/lwt#1027 Would be great if you could have a look and possibly add information that I have missed. |
Thanks for this! |
FYI I ended up with if adjust_terminal <> None then begin
Error_handler.log.warning (fun log ->
log "Dream.run: ~adjust_terminal is deprecated")
end; see Lines 685 to 699 in 05a04f5
because we want to warn on any use of the option at all, as we'd like to remove it eventually, and any code that uses it will break, no matter which behavior it asks for. This is just a note, I normally make such small tweaks to avoid round-trips, it's only to spread the ideas around :) Thanks again! |
Ohh, nice! I didn't know that you could do that with with optional parameters. That's really neat. |
This adds a special case for handling signals when we are running in a Docker container. If our PID is 1 then we just exit. This solves #174. I'm not entirely sure why the existing approach doesn't work when running in Docker, but I suspect it's got something to do with dream being the PID 1 and then killing itself that Docker doesn't like.
I used this (very bad) Dockerfile to test the implementation: