Using Wt 3.2.3 with Boost 1_41 on Scientific Linux 6.3, I've added a shutdown 
button that calls

Wt::Wserver::instance()->stop()

For testing purposes, I want to shutdown my Wt based application cleanly, so I 
can debug my application's memory use using Valgrind.

However, Wt::WServer::waitForShutdown() sleeps forever:

#if !defined(WIN32)
  if (!CatchSignals) {
    for(;;)
      sleep(0x1<<16);
  }
#endif // WIN32

I verified: CatchSignals==false



Question 1) 
Is this code correct? - if CatchSignals == false, waitForShutdown() will never 
terminate.

(apparently CatchSignals == false, if you pass the --gdb command line flag.)

I ran my application again, without the --gdb flag.  When I click my shutdown 
button, I see the message:
WebController: shutdown: stopping sessions.

but my application does not terminate.

if I hit ^C, then I see the message:
"WServer/wthttp: shutdown (signal = 2)"

but the application still does not terminate.

Question 2)
How do I determine what Wt is waiting on? In particular, if I have to omit the 
--gdb flag, how do I used the debugger to  look at the state of Wt?

Question 3) 
Does anyone have any additional advice on cleanly terminating Wt applications?



------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to