lp:~jamesodhunt/upstart/upstart-shutdown-temp

Created by James Hunt and last modified
Get this branch:
bzr branch lp:~jamesodhunt/upstart/upstart-shutdown-temp
Only James Hunt can upload to this branch. If you are James Hunt please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
James Hunt
Project:
upstart
Status:
Development

Recent revisions

1429. By James Hunt

Temporary commit - TEST_DIVERT_* in test_usage() appears to be
clobbering test_quiesce() somehow.

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.

1427. By Steve Langasek

Merge change to drop explicit --instance, --job arguments to initctl setenv

1426. By James Hunt

* init/control.c:
  - Use control_check_permission() 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.

1421. By James Hunt

* dbus/com.ubuntu.Upstart.xml:
  - Added 'job_details' string array as first parameter for GetEnv,
    SetEnv, UnsetEnv, ListEnv and ResetEnv to allow methods to either
    act globally or on a specific job environment.
* init/control.c:
  - control_set_env():
  - control_unset_env():
  - control_get_env():
  - control_list_env():
  - control_reset_env():
    - Disallow setting for PID 1.
    - Operate globally or on specified job.
* init/control.h: control_get_job(): Macro to simplify extracting job
  from provided job details.
* init/job.c: job_find(): New function.
* init/job_class.c:
  - job_class_environment_set(): Delimiter handling now moved to
    control_set_env() so it can be shared by job and global logic.
  - job_class_find(): New function.
* init/state.c:
  - Removed state_get_job() and replaced calls with job_find().
* util/initctl.c:
  - Updated *_action() functions for new D-Bus parameters and made use
    of new function get_job_details().

1420. By James Hunt

* Merge of lp:~jamesodhunt/upstart/remove-basic-user-sessions.
  (Note: won't compile due to dependency of commit about to be applied).

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
lp:upstart
This branch contains Public information 
Everyone can see this information.

Subscribers