Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Mar 2019 15:37:15 -0600
From:      Alan Somers <asomers@freebsd.org>
To:        Larry Rosenman <ler@lerctr.org>
Cc:        Freebsd current <freebsd-current@freebsd.org>, Aki Tuomi <aki.tuomi@open-xchange.com>
Subject:   Re: kqueue send over unix socket?
Message-ID:  <CAOtMX2g2043BCet5HWJRUFApMbUP4cUOWVnRb8m7n1Lf95tM8w@mail.gmail.com>
In-Reply-To: <caf6f8e4677d7071e01457578ab00249@lerctr.org>
References:  <caf6f8e4677d7071e01457578ab00249@lerctr.org>

next in thread | previous in thread | raw e-mail | index | archive | help

Is he trying to send the kqueue file descriptor itself using sendmsg
with SCM_RIGHTS?  It sounds like kqueues cannot be sent over unix
sockets; not every file type necessarily can.  But if you want to know
the nitty-gritty details, just run this:
dtrace -i 'fbt:::return /arg1 == 45/ {stack();}' -c "my_program
my_options" and that will usually tell you the exact function that set
the error.

If the output is too large, then you can filter it by writing a D
program like this:

#sendmsg.d
fbt:kernel:sys_sendmsg:entry
{
        this->trigger = 1;
}
fbt:::return
/ this->trigger == 1 && arg1 == 45 /
{
        stack();
}
fbt:kernel:sys_sendmsg:return
{
        this->trigger = 0;
}

dtrace -s sendmsg.d -c "my_program my_options"

Hope that helps.
-Alan

On Tue, Mar 12, 2019 at 3:22 PM Larry Rosenman <ler@lerctr.org> 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".
>
> Can anyone help me?
>
>
>
> --
> Larry Rosenman                     http://www.lerctr.org/~ler
> Phone: +1 214-642-9640                 E-Mail: ler@lerctr.org
> US Mail: 5708 Sabbia Dr, Round Rock, TX 78665-2106
> _______________________________________________
> freebsd-current@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2g2043BCet5HWJRUFApMbUP4cUOWVnRb8m7n1Lf95tM8w>