Joseph,

1. I don't know by heart

2. Wt is waiting on the session that calls WServer::stop(). It is not
intended to be called from a Wt session, since stop() will only return
after all sessions are terminated, but it can't terminate because it's
an active session that calls it.

3. Run with Wt in valgrind without passing --gdb to Wt; press Ctrl-C
on the console and Wt will terminate cleanly (destroy all WApplciation
objects etc). Your report will contain the memory leaks you're looking
for.

BR,
Wim.

2012/11/5 Joseph VanAndel <vanan...@ucar.edu>:
> 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

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to