[mythtv-users] MythSystemEventHandler: Command '...' returned 1
Raymond Wagner
raymond at wagnerrp.com
Thu Apr 19 16:39:18 UTC 2012
On 4/19/2012 12:25, Thomas Boehm wrote:
> Raymond Wagner wrote:
>> On 4/19/2012 08:13, Thomas Boehm wrote:
>>> Oh boy, just found out that the commands are run as user mythtv and not
>>> as the user who run's the frontend. Is this intended to be like this?
>>> Especially since this is a "per frontend setting"...
>> This is a per-host setting, and each connected host will run the
>> specified handler once. The master backend will always run the command
>> directly on whatever host it is running on. It will then pick one
>> application connected to it from each connected host to run the command
>> through.
> This went right over my head, especially the last sentence ;-)
The System Event... system... was built on top of MythTV's existing
event system. Typically, connections to the backend protocol are led by
the client. The client sends a query, the backend responds with a
result or error. When you announce yourself to the backend, you have
the option to reverse this. The backend sends events, and the client
does nothing, just handles them or ignores them.
System Events are a variation on this, and while normal events are sent
to any client that requests them, system events will only be sent to one
client per host. Since they trigger external commands, you only want
them running once per host. There is nothing controlling which client
will be issued the event, so the only guarantee you have in that regard
is that the master backend will be the one to handle it on its host.
More information about the mythtv-users
mailing list