[rfc] move activation to a helper process

Havoc Pennington hp at redhat.com
Mon Oct 16 08:27:32 PDT 2006


Can't read the patch until later, but quickly on some of the questions -

David Zeuthen wrote:
> TODO's
>  - What should we do if 'User' key is not set for system bus activation?
>    Just run it as root?

I'd default to running it as nobody (running it as messagebus could 
cause problems), or else refuse to run it and log an error.

>  - Conversely, what to do if 'User' key is set for session bus
>    activation? Just refuse to run it?

I would maybe log an error and then ignore the User key.

(as we discussed earlier, "log an error" isn't quite defined right now, 
but could do dbus_warn until we patch that)

>  - Not sure how to do OOM tests for helper since it's a separate
>    process, ideas welcome

Basically you'd need to run the helper code from a test harness instead 
of inside the entire bus activation setup.

>  - Not sure how add meaningful tests to activation-helper.c, ideas
>    welcome too

Don't stress too much about meaningful vs. not; just ensuring all the 
code gets executed is already very high-value, it catches many segfault 
/ not-handling-oom type of bugs that people accidentally introduce.

But usually the only way to add unit tests is to make things a little 
more modular than you otherwise would so the code can be test-harnessed

Will read the patch later on, thanks!


More information about the dbus mailing list