vlc/modules/control
Alexandre Janniaux 2f2a478740 control: dbus: check EINTR for read
The definition of read() mandates from its prototype that the return
value and errno must be checked since the syscall can be interrupted
without being processed by a signal:

    ../../modules/control/dbus/dbus.c: In function ‘Run’:
    ../../modules/control/dbus/dbus.c:958:19: warning: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
      958 |             (void)read( fds[0].fd, &buf, 1 );
          |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~

In practice, the read is not done on a slow device, but a UNIX pipe
instead, and only when poll() notify that a read operation will be
non-blocking, and we're not supposed to have a signal handler here in
the normal execution (not using tools making use of SIGPROF for
instance), so read() being interrupted is nearly impossible, as opposed
to poll() being interrupted.

The read() call is also changed to use an anonymous compound litteral
which doesn't need to be marked as used manually, since we didn't use
the buffer variable at all.

In the future, using eventfd() to generate a semaphore compatible with
poll() and making the event handling lock-free might be a better
alternative, since read() will return the number of new events, and the
lock would become redundant.
2023-08-10 15:46:34 +00:00
..
cli cli: use WINAPI_FAMILY to disable non-quiet mode 2023-05-22 07:14:29 +00:00
dbus control: dbus: check EINTR for read 2023-08-10 15:46:34 +00:00
globalhotkeys modules: explicitly include windows.h when needed 2023-07-05 13:47:59 +00:00
Makefile.am control: remove unimotion motion handling 2023-03-15 09:00:38 +00:00
dummy.c control/dummy: make dummy-quiet obsolete on all Windows 2023-05-22 07:14:29 +00:00
gestures.c plugins: purge use of set_category() 2021-12-20 09:45:01 +00:00
hotkeys.c hotkey: ensure we have a media before requesting OSD 2023-07-27 11:08:43 +00:00
intromsg.h remove the $Id$ in the source code 2019-01-17 12:21:18 +01:00
lirc.c modules: include vlc_threads.h when using vlc_savecancel() 2023-04-27 19:44:35 +00:00
meson.build control: remove unimotion motion handling 2023-03-15 09:00:38 +00:00
motionlib.c control: remove unimotion motion handling 2023-03-15 09:00:38 +00:00
motionlib.h remove the $Id$ in the source code 2019-01-17 12:21:18 +01:00
netsync.c modules: include vlc_threads.h when using vlc_savecancel() 2023-04-27 19:44:35 +00:00
ntservice.c modules: include vlc_threads.h when vlc_thread_t is used 2023-04-27 19:44:35 +00:00
win_msg.c modules: add a fancy name to internal threads 2022-05-18 07:52:09 +02:00