Merge lp://staging/~stgraber/upstart/upstart-session-socket into lp://staging/upstart
Proposed by
Stéphane Graber
Status: | Merged |
---|---|
Merged at revision: | 1427 |
Proposed branch: | lp://staging/~stgraber/upstart/upstart-session-socket |
Merge into: | lp://staging/upstart |
Diff against target: |
417 lines (+189/-33) 8 files modified
init/control.c (+16/-1) init/job_process.c (+6/-0) init/main.c (+5/-25) init/man/init.5 (+4/-0) init/state.c (+0/-1) util/initctl.c (+34/-5) util/man/initctl.8 (+7/-0) util/tests/test_initctl.c (+117/-1) |
To merge this branch: | bzr merge lp://staging/~stgraber/upstart/upstart-session-socket |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
James Hunt | Approve | ||
Review via email: mp+143344@code.staging.launchpad.net |
Description of the change
This branch implements the UPSTART_SESSION variable from the user session
specification.
Upstart will now always listen to a private DBus socket.
The system instance remains on its usual /com/ubuntu/upstart address.
The user instances use /com/ubuntu/
The path is then exported as UPSTART_SESSION in the job environments, so
that jobs can call initctl and talk to upstart without requiring DBus.
A new --user flag is also added to initctl, when passed, it'll make initctl
use the socket defined in UPSTART_SESSION if present or otherwise will
fallback to the DBus session bus.
To post a comment you must log in.
* conf/rc- sysinit. conf: I've got some reservations about changing the /wiki.ubuntu. com/Foundations Team/Specs/ RaringUpstartUs erSessions# Effect_ of_UPSTART_ SESSION SESSION' . test_initctl. c: We could do with a test for '--user'. This
default jobs we provide. That said, those building systems should
really be creating their own jobs. I think I'd be happy if we added a
note to the README stating that the files in 'conf/' are examples only
and *will* need to be changed by those creating systems using Upstart.
* conf/rc.conf: As above.
* init/control.c: control_init(): Spaces before '(' (4 occurences).
* init/job_process.c:
* init/main.c:
* util/initctl.c:
- user_mode: Comment should be something like 'if TRUE, talk to
Upstart over a private D-Bus socket'.
- upstart_open():
- Space before '(' of getenv call (2 occurences).
- I'd be tempted to save the value of the first call to getenv to
avoid the 2nd call.
- 'else' should be on same line as closing brace of 'if'.
- Shouldn't the logic be inverted here to conform to?:
https:/
So, by default, if UPSTART_SESSION is set, use the private D-Bus
socket, unless the user specifies '--system'.
- options: I'd be tempted to change 'start' to 'run' as the former
implies a long-running operation.
* init/man/init.5: 'Job environment' section needs to be updated for
'UPSTART_
* util/man/initctl.8: Need to document '--user'.
* util/tests/
will necessitate something like:
- Changing _START_UPSTART() into a function and allowing atleast 1 extra
argument to be specified or specifying the type (meaning '--user' or
'--session') would work, along with a test
- Changing WAIT_FOR_UPSTART() into a function to allow the session
bus or private socket to be connected to.
- Then, a test to simply start upstart, wait for it, create a conf
file, check that initctl list shows that job, then stop upstart
(see test_list()).