lp:~jamesodhunt/upstart/upstart-shutdown
- Get this branch:
- bzr branch lp:~jamesodhunt/upstart/upstart-shutdown
Branch merges
- Stéphane Graber (community): Approve
- Upstart Reviewers: Pending requested
-
Diff: 2291 lines (+1581/-107) (has conflicts)22 files modifiedChangeLog (+77/-0)
dbus/com.ubuntu.Upstart.xml (+2/-0)
init/Makefile.am (+17/-15)
init/conf.c (+11/-0)
init/conf.h (+1/-0)
init/control.c (+51/-3)
init/control.h (+1/-0)
init/events.h (+7/-0)
init/job_class.c (+30/-0)
init/job_class.h (+3/-0)
init/job_process.c (+60/-1)
init/job_process.h (+4/-1)
init/main.c (+25/-21)
init/man/init.8 (+19/-2)
init/man/session-end.7 (+34/-0)
init/man/startup.7 (+8/-1)
init/quiesce.c (+248/-0)
init/quiesce.h (+76/-0)
init/session.c (+12/-0)
init/session.h (+1/-0)
util/initctl.c (+1/-1)
util/tests/test_initctl.c (+893/-62)
Branch information
Recent revisions
- 1431. By James Hunt
-
* util/tests/
test_initctl. c:
- timed_waitpid(): Back off if no status change.
- test_quiesce():
- Set XDG_RUNTIME_DIR to a temporary value.
- Remove stale session files.
- test_job_env(): Remove stale session files. - 1430. By James Hunt
-
* util/tests/
test_initctl. c:
- wait_for_upstart(): Functional replacement of WAIT_FOR_UPSTART()
macro. Now accepts @user.
- set_upstart_session( ): Poll to ensure we give Upstart time to
initialise and write the session file.
- _start_upstart(): Extra @user parameter. - 1429. By James Hunt
-
* init/Makefile.am: Added quiesce.o, now required by control.o.
* init/main.c: main():
- SIGHUP+SIGUSR1 handling now applies however you run init (since
it should react to these signals when run as a Session Init).
- Qualified sessions message to avoid confusion.
* util/initctl.c: upstart_open(): Better handling for user_mode.
* util/tests/test_initctl. c:
- WAIT_FOR_UPSTART(): Made session-aware.
- KILL_UPSTART(): Reset user mode flag (taken from STOP_UPSTART()).
- set_upstart_session( ): New function.
- self_pipe_write(): New Function.
- self_pipe_setup(): New Function.
- timed_waitpid(): New function.
- _start_upstart():
- Signal handling and extra checks.
- Discard init output (unless UPSTART_TEST_VERBOSE set)
for saner logs.
- test_list_sessions( ):
- Removed need for a dbus-daemon.
- Added required initctl reset.
- test_quiesce(): Tests for Session Init shutdown (both
system-initiated and end-session request).
- test_usage(): Added extra checks and tidyup.
- main(): Added call to test_quiesce(). - 1428. By James Hunt
-
* dbus/com.
ubuntu. Upstart. xml: Added 'EndSession' method.
* init/Makefile.am: Updated for quiesce.[ch].
* init/conf.c: conf_destroy(): Cleanup function.
* init/conf.h: Prototype.
* init/control.c: control_end_session( ): 'EndSession' implemenation.
* init/control.h: Include.
* init/events.h: Added SESSION_END_EVENT.
* init/job_class.c: job_class_max_kill_ timeout( ): New function.
* init/job_class.h: Prototype.
* init/job_process.c:
- Added disable_respawn to disallow respawns.
- job_process_jobs_running( ): New function.
- job_process_stop_all( ): New function.
- job_process_terminated( ): Honours disable_respawn.
* init/job_process.h: Prototypes.
* init/main.c:
- Typos.
- term_handler(): Quiesce rather than re-exec on receipt of SIGTERM
when running as a Session Init.
- main(): Make quiesce() handle cleanup.
* init/man/init.8: Update for Session Init SIGTERM handling.
* init/man/startup.7: Update for Session Init.
* init/session.c: session_destroy(): New function.
* init/session.h: Prototype.
* init/man/session- end.7: New man page.
* init/quiesce.[ch]: New files. - 1426. By James Hunt
-
* init/control.c:
- Use control_check_permissio n() rather than
control_get_origin_ uid() directly.
* init/control.h: Prototypes.
* init/job_class.c: Change calls to job_class_environment_ init()
to asserts as the former only needs to be called once.
* init/main.c: main(): Make job_class_environment_ init() call as
early as possible.
* init/tests/test_event. c: main(): Call
job_class_environment_ init().
* util/tests/test_initctl. c:
- test_default_job_env( ):
- Set TERM and PATH if not set.
- Check line counts before checking expected output.
- test_clear_job_env( ):
- Make use of TEST_INITCTL_DEFAULT_ PATH. - 1425. By James Hunt
-
* Sync with lp:upstart and resolve test issues relating to new session
code. In so doing, the revised test suite found 3 bugs which are now
fixed:- control_
get_session( ): We now actually pass @session as a parameter.
- job_class_find(): Initialise class to avoid undefined behaviour.
undefined behaviour.
- get_env_action(): Wasn't passing job+instance details to init. - 1424. By James Hunt
-
* util/Makefile.am: Define INITCTL_BINARY and UPSTART_BINARY to ensure
full path available to tests.
* util/tests/test_initctl. c:
- New macros:
- _TEST_STR_ARRAY_CONTAINS( )
- TEST_STR_ARRAY_CONTAINS( )
- TEST_STR_ARRAY_NOT_ CONTAINS( )
- _TEST_FILE_CONTAINS( )
- TEST_FILE_CONTAINS( )
- TEST_FILE_NOT_CONTAINS( )
- get_initctl(): Function to replace original INITCTL_BINARY define.
- test_global_and_local_ job_env( ): New function to test initctl
'--global', '--job' and '--instance' options from within and without
a job. - 1423. By James Hunt
-
* util/initctl.c:
- get_job_details(): Fix order in which arguments are checked. - 1422. By James Hunt
-
* init/control.c:
- control_get_env(): Allow PID 1 environment to be queried for
consistency with control_list_env().
* init/man/initctl.8:
- Added --job, --instance, --global options for list-env, set-env,
get-env, unset-env, reset-env.
- Explain PID 1 limitation for set-env, unset-env, reset-env.
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)
- Stacked on:
- lp:upstart