[pulseaudio-tickets] [Bug 73479] New: paplay incorrectly assumes stdin will be open
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Fri Jan 10 08:45:02 PST 2014
https://bugs.freedesktop.org/show_bug.cgi?id=73479
Priority: medium
Bug ID: 73479
CC: lennart at poettering.net
Assignee: pulseaudio-bugs at lists.freedesktop.org
Summary: paplay incorrectly assumes stdin will be open
QA Contact: pulseaudio-bugs at lists.freedesktop.org
Severity: normal
Classification: Unclassified
OS: Linux (All)
Reporter: simongmzlj at gmail.com
Hardware: All
Status: NEW
Version: unspecified
Component: tools
Product: PulseAudio
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.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-bugs/attachments/20140110/5e0b3a4a/attachment.html>
More information about the pulseaudio-bugs
mailing list