[Redbutton-devel] SF.net SVN: redbutton: [215] redbutton-download/trunk/channels.c
Brought to you by:
skilvington
|
From: <ski...@us...> - 2007-02-13 17:00:09
|
Revision: 215
http://svn.sourceforge.net/redbutton/?rev=215&view=rev
Author: skilvington
Date: 2007-02-13 08:59:54 -0800 (Tue, 13 Feb 2007)
Log Message:
-----------
retry ioctl if it is interrupted by a signal
Modified Paths:
--------------
redbutton-download/trunk/channels.c
Modified: redbutton-download/trunk/channels.c
===================================================================
--- redbutton-download/trunk/channels.c 2007-02-13 14:13:03 UTC (rev 214)
+++ redbutton-download/trunk/channels.c 2007-02-13 16:59:54 UTC (rev 215)
@@ -234,6 +234,7 @@
tune_service_id(unsigned int adapter, unsigned int timeout, uint16_t service_id)
{
char fe_dev[PATH_MAX];
+ bool got_info;
struct dvb_frontend_info fe_info;
struct dvb_frontend_parameters current_params;
struct dvb_frontend_parameters *needed_params;
@@ -261,8 +262,14 @@
vverbose("Getting frontend info");
- if(ioctl(fe_fd, FE_GET_INFO, &fe_info) < 0)
- fatal("ioctl FE_GET_INFO: %s", strerror(errno));
+ do
+ {
+ /* maybe interrupted by a signal */
+ got_info = (ioctl(fe_fd, FE_GET_INFO, &fe_info) >= 0);
+ if(!got_info && errno != EINTR)
+ fatal("ioctl FE_GET_INFO: %s", strerror(errno));
+ }
+ while(!got_info);
if(fe_info.type != FE_OFDM)
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|