When weston opens a device, why does it use two file descriptors?
Wang, Quanxian
quanxian.wang at intel.com
Thu Jul 3 20:10:41 PDT 2014
Hi,
When I start weston in drm backend, I have found weston opens the every device with two fds. I am a little confused by that.
For example, for keyboard device /dev/input/event5, in device_added, it will open the device. Found it returns fd 34, however fd 35 is also used by this operation(from the below information). Anyone knows why?
Weston process number is 668.
root:/quanxian> ls -l /proc/668/fd
lrwx------. 1 root root 64 Jul 3 19:53 0 -> /dev/pts/0
lrwx------. 1 root root 64 Jul 3 19:53 1 -> /dev/pts/0
lrwx------. 1 root root 64 Jul 3 19:53 13 -> /dev/dri/card0
lrwx------. 1 root root 64 Jul 3 19:53 14 -> /dev/dri/card0
lrwx------. 1 root root 64 Jul 3 19:53 15 -> socket:[17763]
lrwx------. 1 root root 64 Jul 3 19:53 16 -> socket:[17763]
lrwx------. 1 root root 64 Jul 3 19:53 17 -> socket:[17764]
lrwx------. 1 root root 64 Jul 3 19:53 18 -> socket:[17764]
lrwx------. 1 root root 64 Jul 3 19:53 22 -> /dev/input/event3
lrwx------. 1 root root 64 Jul 3 19:53 23 -> /dev/input/event3
lrwx------. 1 root root 64 Jul 3 19:53 24 -> /dev/input/event0
lrwx------. 1 root root 64 Jul 3 19:53 25 -> /dev/input/event0
lrwx------. 1 root root 64 Jul 3 19:53 26 -> /dev/input/event1
lrwx------. 1 root root 64 Jul 3 19:53 27 -> /dev/input/event1
lrwx------. 1 root root 64 Jul 3 19:53 28 -> /dev/input/event7
lrwx------. 1 root root 64 Jul 3 19:53 29 -> /dev/input/event7
lrwx------. 1 root root 64 Jul 3 19:53 30 -> /dev/input/event8
lrwx------. 1 root root 64 Jul 3 19:53 31 -> /dev/input/event8
lrwx------. 1 root root 64 Jul 3 19:53 32 -> /dev/input/event4
lrwx------. 1 root root 64 Jul 3 19:53 33 -> /dev/input/event4
lrwx------. 1 root root 64 Jul 3 19:53 34 -> /dev/input/event5
lrwx------. 1 root root 64 Jul 3 19:53 35 -> /dev/input/event5
lrwx------. 1 root root 64 Jul 3 19:53 36 -> /dev/input/event6
lrwx------. 1 root root 64 Jul 3 19:53 37 -> /dev/input/event6
Thanks
Regards
Quanxian Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20140704/56d538f3/attachment.html>
More information about the wayland-devel
mailing list