It runs fine in centos, but when I try to stop the server, it seems to hang in the terminal, and I have to Ctrl+Z to get back to the command line. How do I gracefully shut the server down?
THorse.Listen(9000,
procedure
begin
WriteLn;
Write('Press ENTER to stop server...');
Readln;
THorse.StopListen;
end);
What is interesting is that if an endpoint is never called, you can press ENTER and it will terminated as expected. However, call an endpoint and when you press ENTER, the server shutdown as you are not able to access the url anylonger, but the terminal window hangs.
It runs fine in centos, but when I try to stop the server, it seems to hang in the terminal, and I have to Ctrl+Z to get back to the command line. How do I gracefully shut the server down?
What is interesting is that if an endpoint is never called, you can press ENTER and it will terminated as expected. However, call an endpoint and when you press ENTER, the server shutdown as you are not able to access the url anylonger, but the terminal window hangs.