Bug 224011

Summary: kevent fails on cuse(3) devices
Product: Base System Reporter: Yuri Victorovich <yuri>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: New ---    
Severity: Affects Only Me CC: cem
Priority: ---    
Version: 11.0-STABLE   
Hardware: Any   
OS: Any   

Description Yuri Victorovich freebsd_committer freebsd_triage 2017-12-01 06:08:30 UTC
kevent fails on /dev/video0 (created through cuse(3) by webcamd).

The below testcase fails:
> QKqueueFileSystemWatcherEngine::addPaths: kevent: Invalid argument


Qt-styled testcase:

> #include <QFileSystemWatcher>
> #include <QThread>
> 
> class T : public QThread {
> public:
>   void run() {
>     auto m_fsWatcher = new QFileSystemWatcher({"/dev"}, nullptr);
>     QStringList paths;
>     paths.push_back("/dev/video0");
>     m_fsWatcher->addPaths(paths);
>   }
> };
> 
> int main(int argc, char* argv[]) {
>   T t;
>   t.start();
>   t.wait();
> }

> c++ -std=c++11 -fPIC -o testcase -I/usr/local/include/qt5/QtCore -I/usr/local/include/qt5 testcase.cpp  -L/usr/local/lib/qt5/ -lQt5Core