Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Jul 2012 20:55:02 GMT
From:      Maxim "WGH" <wgh@torlan.ru>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/170177: Cannot watch UNIX sockets for "vnode" events using kqueue
Message-ID:  <201207252055.q6PKt2S1017065@red.freebsd.org>
Resent-Message-ID: <201207252100.q6PL0Pw9085601@freefall.freebsd.org>

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

>Number:         170177
>Category:       kern
>Synopsis:       Cannot watch UNIX sockets for "vnode" events using kqueue
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jul 25 21:00:25 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Maxim "WGH"
>Release:        FreeBSD 8.1-RELEASE-p1
>Organization:
>Environment:
FreeBSD torlan 8.1-RELEASE-p1 FreeBSD 8.1-RELEASE-p1 #8: Sat Oct 30 23:25:06 MSD 2010     wgh@torlan:/usr/obj/usr/src/sys/TORLAN  i386
>Description:
kqueue provides a facility to watch file changes (EVFILT_VNODE). UNIX sockets are also files, they have file modes [1], they can be unlinked, etc. All these things can be watched by kqueue.

In order to do so, however, one has to provide file descriptor. 

The problem is that file descriptors for UNIX socket are essentially unobtainable. open()'ing sockets is not implemented, as it's stated in manual and seen in the source code. connect()'ed sockets also don't work, kevent() just returns EINVAL for them.

1. screen and patched dtach set the "executable" bit of socket if there're clients attached. Watching for its changes in an efficient way would be useful.
>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:



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