Defining TEVENT_NUM_SIGNALS as (2 * SIGRTMIN) so that SIGNAL-based AIO handling on FreeBSD works

Richard Sharpe realrichardsharpe at
Fri Nov 30 16:06:18 MST 2012

Hi folks,

I am canvassing opinions on whether there is a better way to do this.

Currently, the default AIO stuff in Samba does not work on FreeBSD
because TEVENT_NUM_SIGNALS is set to 64 and there is a check to see
that the signal number used by the AIO stuff does not exceed this

However, if RT_SIGNAL_AIO Is not set, then:

/* The signal we'll use to signify aio done. */

in source3/smbd/aio.c but on FreeBSD

/usr/include/sys/signal.h:#define       SIGRTMIN        65

So, things do not work.

One solution is to define TEVENT_NUM_SIGNALS as 2 * SIGRTMIN ...

On Linux SIGRTMIN is 32.

Can anyone suggest a better fix?

Richard Sharpe

More information about the samba-technical mailing list