Hello, You are running C++ in a pthread environment, I would presume from that snippet. Therefore you need to use pthread_sigmask(3) and sigwait(3) in the same thread, call server.stop() and serve() will return. Usual signal(2) approach in not specified for multithread environment.
On 01:21 2010-10-23 -0400, Richard Salz wrote:
> When a server is in its "serve" loop:
> server.serve()
> printf("Exiting..\n");
>
> What't the right way to make that stop and return so the printf happens? I
> thought having having SIGTERM call server.stop(), but apparently not. What
> should I do?
>
--
Pozdrawiam,
Łukasz P. Michalik
pgp3aPmUrAvMm.pgp
Description: PGP signature
