awesome's Lua core API has a function "exec" which will do what it indicates - a call to exec(), thus replacing its process by another. I think upstart shouldn't get in the way here since the PID is still claimed by the new process, i.e. it seems to be still running.
As of how to make awesome execute this command - it has a DBus interface. I can't look right now if the Kindle ships the awesome-client binary which is a wrapper that will issue DBus calls to the running awesome instance. Otherwise, you would need to make up the DBus call yourself.
The awesome source code is a bit sprinkled over many files but still quite readable.
That said, I don't know if Amazon made some bigger modifications.
|