mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-09-19 01:29:59 +02:00
c53f7cd038
A race at creating a lock file in state_lock() was discovered recently: namely, between the first open(O_RDWR) and the second open(O_RDWR|O_CREAT|O_EXCL) calls, another alsactl invocation may already create a lock file, then the second open() will return EEXIST, which isn't handled properly and treated as a fatal error. In this patch, we check EEXIST case and try again open() with O_RDWR. This must succeed usually, and if it fails, handle finally as the fatal error. BugLink: https://bugzilla.opensuse.org/show_bug.cgi?id=1179904 Signed-off-by: Takashi Iwai <tiwai@suse.de> |
||
---|---|---|
.. | ||
init | ||
.gitignore | ||
90-alsa-restore.rules.in | ||
alsa-restore.service.in | ||
alsa-state.service.in | ||
alsactl.1 | ||
alsactl.c | ||
alsactl.h | ||
alsactl_init.xml | ||
daemon.c | ||
init_parse.c | ||
init_sysdeps.c | ||
init_sysfs.c | ||
init_ucm.c | ||
init_utils_run.c | ||
init_utils_string.c | ||
list.h | ||
lock.c | ||
Makefile.am | ||
monitor.c | ||
state.c | ||
utils.c |