Bug 224011 - kevent fails on cuse(3) devices
Summary: kevent fails on cuse(3) devices
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 11.0-STABLE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-01 06:08 UTC by Yuri Victorovich
Modified: 2017-12-01 18:07 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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