>The API does not *need* to set the FD_CLOEXEC flag,
>and so it should not. It is the height of arrogance to
>assume that something has no use simply because you
>can't imagine using it.

there's a little detail you're forgetting. unless the hw supports
multi-open and the current number of subunits is below the limit of
the number of opens, then having the descriptor will cause all other
attempts to access the device to block (unless they explicitly request
non-blocking open, which means they then have to unset that flag for
normal application operation). this means that even if the parent has
closed the ALSA device, the child still (unwittingly) has it open. its
easy to imagine situations where the user will be completely puzzled
to find that another program cannot start up because they believe they
exited from the previous audio program. they don't understand that the
child process it started (say, a bug reporting system) still has the
device open.

this is quite different from how file descriptors that refer to disk
files, ttys and most other devices operate.

of course, its questionable whether the block-on-open approach is
correct, but so far discussions on this list have supported it.

--p


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to