On Fri, Feb 16, 2018 at 08:52:13AM -0600, ed...@pettijohn-web.com wrote: > Perhaps a doc bug then. Or an interpretation bug on my part. >From event_init(3)'s DESCRIPTION:
The event API needs to be initialized with event_init() before it can be used. > > The event_asr_run() function is used to schedule the asynchronous resolver > query aq to run within a libevent event loop, and call the fn callback when > the result is available. The extra arg parameter is passed to the callback. > The user does not need to set up an event structure for using this function. > It returns an opaque handle representing the running query. This handle > becomes invalid before the callback is run. > > I interpreted this to mean it took care of the event stuff for me. Either > way, thanks. > On Feb 16, 2018 8:21 AM, Eric Faurot <e...@faurot.net> wrote: > > > > On Thu, Feb 15, 2018 at 07:41:55PM -0600, Edgar Pettijohn wrote: > > > I have this trivial program that I keep getting a segfault trying to use > > > event_asr_run(). I have #if 0'd working code to show my progression from > > > getaddrinfo() to event_asr_run(). It is hopefully something trivial that > > > I'm > > > overlooking. Anyway I compiled like so: > > > > You need to call event_init() before using other libevent functions. > > > > Eric. > > >