mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-09 17:55:43 +01:00
alsactl: daemon - read_pid_file() fix the returned code on read error
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
05ebe64b2d
commit
42ca978078
1 changed files with 1 additions and 1 deletions
|
@ -284,7 +284,7 @@ static long read_pid_file(const char *pidfile)
|
|||
err = err < 0 ? -errno : -EIO;
|
||||
close(fd);
|
||||
pid_txt[11] = '\0';
|
||||
return atol(pid_txt);
|
||||
return err < 0 ? err : atol(pid_txt);
|
||||
} else {
|
||||
return -errno;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue