kqueue send over unix socket?

Konstantin Belousov kib at freebsd.org
Tue Mar 12 21:49:09 UTC 2019


On Tue, Mar 12, 2019 at 04:10:19PM -0500, Larry Rosenman wrote:
> I'm working with Aki Tuomi of Dovecot and he asks:
> 
> I tried to ask if you could ask from some Kernel hacker why I cannot 
> send kqueue() fd over unix socket, I get "Operation not supported".
Right, because sending kqfd to other process does not make sense.
For the same reason kqueue filedescriptors are closed on fork.

Issue is that kqueue operates on file descriptors, it stores events
and names them by fd you use for registration.  So all registered
events names become meaningless when process operates on different
file descriptor table, which happens after fork() or if kqfd is
passed over unix socket to other process.

Technically this occurs because kqueue file ops structure does not
specify DFLAG_PASSABLE.

> 
> Can anyone help me?
> 
> 
> 
> -- 
> Larry Rosenman                     http://www.lerctr.org/~ler
> Phone: +1 214-642-9640                 E-Mail: ler at lerctr.org
> US Mail: 5708 Sabbia Dr, Round Rock, TX 78665-2106
> _______________________________________________
> freebsd-current at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe at freebsd.org"


More information about the freebsd-current mailing list