You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The SIGINT (Ctrl+C) signal isn't handled properly when running inside a Docker container.
I would expect when pressing Ctrl+C that the program and then the container exits. Instead, nothing happens and after pressing Ctrl+C three times the container is stopped forcefully (but still running in the background, needs to be killed manually with docker kill)
lethttpaf_connection_handlersock_addry=let _ = sock_addr inlet _ = y inlet%lwt ()=Lwt_io.printl "got request!"inLwt_io.eprintl "got request on stderr!"let x =let%lwt listen_address =let%lwt addresses =Lwt_unix.getaddrinfo "127.0.0.1""7654"[]inmatch addresses with|[] -> failwith "shouldn't happen"|address :: _ -> Lwt.return Lwt_unix.(address.ai_addr)
inlet%lwt server =Lwt_io.establish_server_with_client_socket listen_address
httpaf_connection_handler
inlet never = fst (Lwt.wait ()) inlet stop = never inlet%lwt ()= stop inLwt_io.shutdown_server server
let()=Lwt_main.run x
I'm not sure if that's really the most minimal working example, but it's the best I could come up with. It's mostly cobbled together from how Dream uses Lwt internally (where we first encountered the bug)
The SIGINT (Ctrl+C) signal isn't handled properly when running inside a Docker container.
I would expect when pressing Ctrl+C that the program and then the container exits. Instead, nothing happens and after pressing Ctrl+C three times the container is stopped forcefully (but still running in the background, needs to be killed manually with
docker kill
)Reproduction example at https://github.com/maxrn/lwt_test including Docker file, but this is the code I used:
I'm not sure if that's really the most minimal working example, but it's the best I could come up with. It's mostly cobbled together from how Dream uses Lwt internally (where we first encountered the bug)
fyi @aantron
The text was updated successfully, but these errors were encountered: