[mythtv] [PATCH] External channel changer's exit code missed
Jeremiah Morris
jm at whpress.com
Sat Jan 22 11:11:42 EST 2005
On 22 Jan 2005, at 3:51 AM, Isaac Richards wrote:
> On Saturday 22 January 2005 03:36 am, Richard Gering wrote:
>> Greetings,
>>
>> The current implementation of the external channel changer misses the
>> exit code set by that changer, because it (accidentally) runs that
>> program as an additional background process.
>
> Can't drop the &, people will start bitching about the slower channel
> change
> speed.
The current verbose messages are misleading, as they imply that the
channel change exit is monitored; we should at least change the
messages to reflect the situation.
- Jer
Index: libs/libmythtv/channelbase.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/channelbase.cpp,v
retrieving revision 1.12
diff -u -r1.12 channelbase.cpp
--- libs/libmythtv/channelbase.cpp 8 Jan 2005 00:22:58 -0000
1.12
+++ libs/libmythtv/channelbase.cpp 22 Jan 2005 16:04:27 -0000
@@ -161,7 +161,7 @@
else
{ // child contains the pid of the new process
int status = 0, pid = 0;
- VERBOSE(VB_CHANNEL, "Waiting for External Tuning program to
exit");
+ VERBOSE(VB_CHANNEL, "Waiting for External Tuning program to
launch");
bool timed_out = false;
uint timeout = 30; // how long to wait in seconds
@@ -179,14 +179,16 @@
}
if (timed_out)
{
- VERBOSE(VB_IMPORTANT, "External Tuning program timed out,
killing");
+ VERBOSE(VB_IMPORTANT, "External Tuning program launcher "
+ "timed out, killing");
kill(child, SIGTERM);
usleep(500);
kill(child, SIGKILL);
return false;
}
- VERBOSE(VB_CHANNEL, "External Tuning program no longer
running");
+ VERBOSE(VB_CHANNEL, "External Tuning program launcher "
+ "no longer running");
if (WIFEXITED(status))
{ // program exited normally
int ret = WEXITSTATUS(status);
@@ -194,14 +196,17 @@
{ // external tuning program returned error value
VERBOSE(VB_IMPORTANT,
QString("ChannelBase: external tuning program "
+ "launcher (/bin/sh -c) "
"exited with error %1").arg(ret));
return false;
}
- VERBOSE(VB_IMPORTANT, "External Tuning program exited with
no error");
+ VERBOSE(VB_IMPORTANT, "External Tuning program launched
with "
+ "no error");
}
else
{ // program exited abnormally
QString msg = QString("ChannelBase: external tuning
program "
+ "launcher (/bin/sh -c) "
"encountered error %1 --
").arg(errno);
msg.append(strerror(errno));
VERBOSE(VB_IMPORTANT, msg);
%
More information about the mythtv-dev
mailing list