From: Glenn Maynard Subject: Re: ALSA and select, poll, ... (interrupted system calls) Date: Thu, 24 Jun 2004 04:12:07 -0400 Sender: alsa-devel-admin@lists.sourceforge.net Message-ID: <20040624081207.GD25899@zewt.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org On Tue, Jun 22, 2004 at 12:01:38PM +0200, Nicolas H=FCppelsh=E4user wrote= : > > > By now I workaround with a mixture of nanosleep/"time polling" (tra= cking > > > elapsed system time in a loop). Is there a better way? > > > > If you're waiting anyway, why don't you simply wait with poll? >=20 > I need to wait a defined amount of time. > And it doesn't make a differecne whether using poll or nanosleep since > both get interrupted by alsa async signals. What's wrong with nanosleep? Its entire purpose is for sleeping across s= ignals: timespec ts =3D { 10, 0 }, rem; while( nanosleep( &ts, &rem ) =3D=3D -1 && errno =3D=3D EINTR ) ts =3D rem; // keep waiting --=20 Glenn Maynard ------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com