[mythtv] execl needs 'NULL'

jasonmiller jasonmiller at micron.com
Thu Mar 27 08:13:46 EST 2003


I just ran into the same problem.  The strange thing, however, is that I was running 0.8 for a while and the latest cvs as well.  The problem didn't show up until I restarted X last night without changing myth at all.  I'm running Gentoo and my emerge log doesn't show any updates since the last reboot.  I have no idea what might have changed.  Something obviously :)

Is anyone else seeing this or is it an isolated thing?

-----Original Message-----
From: mark at zzo.com [mailto:mark at zzo.com]
Sent: Wednesday, March 26, 2003 5:40 PM
To: mythtv-dev at snowman.net
Subject: [mythtv] execl needs 'NULL'


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
------------------------------------------
_______________________________________________
mythtv-dev mailing list
mythtv-dev at snowman.net
http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-dev


More information about the mythtv-dev mailing list