On Wed, Sep 04, 2024 at 08:15:32PM +0200, Florian Obser wrote: > On 2024-09-04 19:39 +02, Florian Obser <flor...@openbsd.org> wrote: > > event_dispatch() in main(), frontend() and engine() returns 0. > > > > the man page says: > > > > In order to process events, an application needs to call > > event_dispatch(). This function only returns on error, and should > > replace the event core of the application program. > > > > which apparently is a lie. No idea how this can happen. > > > > > > I guess we are hitting this in event_base_loop(): > > > > if (base->event_count_active) { > > event_process_active(base); > > if (!base->event_count_active && (flags & > > EVLOOP_ONCE)) > > done = 1; > > } else if (flags & EVLOOP_NONBLOCK) > > done = 1; > > > > at the top of the loop are two breaks that also exit the loop and lead > to a return (0): > > /* Terminate the loop if we have been asked to */ > if (base->event_gotterm) { > base->event_gotterm = 0; > break; > } > > if (base->event_break) { > base->event_break = 0; > break; > } > > Still no idea how any of this can happen...
By calling event_loopexit() in e.g. main_dispatch_engine()? -- :wq Claudio