I ran into this issue after debuging why paplay wouldn't work in a script called by another program. It looks like this program closes stdin/stdout/stderr before running the script. This causes this to happen: open("foo.wav", O_RDONLY|O_NOCTTY|O_CLOEXEC) = 0 fcntl(0, F_GETFD) = 0x1 (flags FD_CLOEXEC) dup2(0, 0) = 0 close(0) = 0 fstat(0, 0x7fffaa2ce740) = -1 EBADF (Bad file descriptor) Open returns 0, as it should, in this case. However the assumption that stdin is still present causes the dup2/close syscalls to close the filedescriptor we've just opened and not stdin as intended. This causes paplay to die with a EBADF error.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/43.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.