Re: I/O possible

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mihaela Vitalariu wrote:
> Thank you for the reply!
> Well, i use async I/O because this is the way my program works, using 
> callbacks,
> and i just can't disable it :(
>
> On Jan 16, 2008 4:51 PM, Erik Slagter < erik@xxxxxxxxxxxx 
> <mailto:erik@xxxxxxxxxxxx>> wrote:
>
>     Mihaela Vitalariu wrote:
>     > I am coding a Linux sound application using the PCM interface.
>     > It plays fine but at unexpected intervals i sometimes get a SIGIO
>     > directly in my program, which exits printing the message "I/O
>     possible".
>     > What can be happening?
>
>     Looks like you enable asynchronous I/O one way or the other.
>
>     Best solution is to not enable this, a quick workaround would be to
>     ignore these signals (man 2 signal).
>

I bet someone somewhere is using signal(3) instead of sigaction(2).   
signal() is the old interface which has some unpleasant side effects -- 
for example, the handler is reset to the default once the signal has 
been delivered.  In the bad old days the first thing your signal handler 
did was to ignore the signal and the last thing it did was to reinstall 
the handler.  That's horrible.   On the other hand, if you use 
sigaction() then the signal will be pending signals blocked (not 
ignored) while you're in the handler and the handler will also remain in 
place.

jch

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user

[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux