The kqueue backend doesn't support out of band data.
Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=7063
Reported by @grubba
The socktest.pike test "Testing out-of-band data" times out when waiting for the sent out of band data to arrive.
With OOB_DEBUG enabled on a pike compiled with BACKEND_DEBUG, the following is output:
Child: Testing out-of-band data
originator: Stdio.File("socket", "127.0.0.1:62128", 777 /* fd=9 */)
loopback: Stdio.File("socket", "127.0.0.1 62129", 777 /* fd=10 */)
[2085229328]BACKEND[0]: hook_fd_callback_box: fd 9, events 0xc, object 0x1008227d0
[2085229328]BACKEND[0]: pdb_update_fd_set(.., 9, 0, 12):
[2085229328]BACKEND[0]: fd:9 READ, ADD, [OOBAND]
[2085229328]BACKEND[0]: fd:9 WRITE, ADD
BACKEND: EV_ADD fd:9, filter:-2
BACKEND: EV_ENABLE fd:9, filter:-2
[2085229328]BACKEND[0]: hook_fd_callback_box: fd 10, events 0x4, object 0x1008227a0
[2085229328]BACKEND[0]: pdb_update_fd_set(.., 10, 0, 4):
[2085229328]BACKEND[0]: fd:10 READ, ADD, [OOBAND]
[2085229328]BACKEND[0]: Doing poll on fds:
=> 1 (timeout was: 3600)
[2085229328]BACKEND[0]: fd:9 filter:-2 flags:0x00000001 EVFILT_WRITE(146988)
[2085229328]BACKEND[0]: POLLWRBAND on 9
[2085229328]BACKEND[0]: POLLOUT on 9
[2085229328]BACKEND[0]: hooking in box for fd 9
[2085229328]BACKEND[0]: Examining box for fd 9 revents:0x000a
[2085229328]BACKEND[0]: write_oob_callback(9, 0x1008227d0)
[2085229328]BACKEND[0]: set_fd_callback_events: fd 9, events from 0xc to 0x4, object 0x1008227d0
[2085229328]BACKEND[0]: pdb_update_fd_set(.., 9, 12, 4):
[2085229328]BACKEND[0]: fd:9 WRITE, DISABLE
BACKEND: EV_DISABLE fd:9, filter:-2
S[2085229328]BACKEND[0]: set_fd_callback_events: fd 9, events from 0x4 to 0xc, object 0x1008227d0
[2085229328]BACKEND[0]: pdb_update_fd_set(.., 9, 4, 12):
[2085229328]BACKEND[0]: fd:9 WRITE, ADD
BACKEND: EV_ADD fd:9, filter:-2
BACKEND: EV_ENABLE fd:9, filter:-2
[2085229328]BACKEND[0]: set_fd_callback_events: fd 9, events from 0xc to 0x4, object 0x1008227d0
[2085229328]BACKEND[0]: pdb_update_fd_set(.., 9, 12, 4):
[2085229328]BACKEND[0]: fd:9 WRITE, DISABLE
BACKEND: EV_DISABLE fd:9, filter:-2
[2085229328]BACKEND[0]: set_fd_callback_events: fd 10, events from 0x4 to 0x4, object 0x1008227a0
[2085229328]BACKEND[0]: pdb_update_fd_set(.., 10, 4, 4):
[2085229328]BACKEND[0]: Examining box for fd -1 revents:0x0000
[2085229328]BACKEND[0]: Doing poll on fds:
[*timeout*]^C
What we can see above is that a single byte is sent on fd #9 ("S" above), but not notified on fd #10 even though it has PIKE_BIT_FD_READ_OOB (4) set.