[mythtv] execl needs 'NULL'
mark at zzo.com
mark at zzo.com
Wed Mar 26 16:40:25 EST 2003
So after freshly upgrading to .8 my perl based external channel
changing script kept failing with:
56 happy.zzo.com:/home/mark% mythbackend
Starting up as the master server.
Probed: /dev/video - Television
Probed: /dev/video - Composite1
External channel change: /home/mark/cc.pl 2
exec: Bad address
External channel change command exited with status 256
Turns out the execl call needs to be NULL terminated.
Unclear why/how it was working for anyone else:
Index: libs/libmythtv/channel.cpp
===================================================================
RCS file: /var/lib/cvs/MC/libs/libmythtv/channel.cpp,v
retrieving revision 1.33
diff -u -p -r1.33 channel.cpp
--- libs/libmythtv/channel.cpp 23 Mar 2003 21:13:27 -0000 1.33
+++ libs/libmythtv/channel.cpp 27 Mar 2003 00:36:50 -0000
@@ -638,7 +638,7 @@ bool Channel::ChangeExternalChannel(cons
{
for(int i = 3; i < sysconf(_SC_OPEN_MAX) - 1; ++i)
close(i);
- execl("/bin/sh", "sh", "-c", command.ascii());
+ execl("/bin/sh", "sh", "-c", command.ascii(), NULL);
perror("exec");
exit(1);
}
M
--
------------------------------------------
Mark Ethan Trostler mark at zzo.com
Computing Solutions http://www.zzo.com
------------------------------------------
More information about the mythtv-dev
mailing list