Re: Userspace module return value?
Ingo Molnar <[email protected]> Tue, 20 Jul 2004 15:09:25 +0200
| Newsgroups | gmane.network.tux |
|---|---|
| Message-ID | <[email protected]> |
* Marek Habersack <[email protected]> wrote: > [...] I have found a solution which takes care of the problem, but > feels like a hack - I'm returning TUX_RETURN_USERSPACE_REQUEST every > time except when closing the connection, when I return the value > returned from tux(TUX_ACTION_FINISH_CLOSE_REQ, req). That seems to > work so far, but is it the right solution? Could anybody, please, shed > some light on the handle_events return value? you should return whatever the tux() call returns. Normally tux() would give you a value of 0 (TUX_RETURN_USERSPACE_REQUEST), but occasionally it could return TUX_RETURN_SIGNAL (when a signal is caught) or TUX_RETURN_EXIT (when Tux is being shut down). These are the only values that are returned currently. To debug this, could you log all tux() return values that are not 0? To do this just start up the Tux daemon manually without the 'daemon' prefix. The simplest way is to modify /etc/rc.d/init.d/tux and remove the 'daemon' word. This means 'service tux start' will 'hang' after startup but you'll get all printfs to that console. You can then abort the daemon via Ctrl-C and 'service tux stop'. Ingo