lp:~jamesodhunt/upstart/16032012

Created by James Hunt on 2012-03-16 and last modified on 2012-03-16
Get this branch:
bzr branch lp:~jamesodhunt/upstart/16032012
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

1368. By James Hunt on 2012-03-16

* log.c: log_read_watch(): Set remote_closed for scenarios where
  error handler never called. (LP: #935585)

1367. By James Hunt on 2012-03-16

* dbus/com.ubuntu.Upstart.xml:
  - added 'NotifyDiskWriteable' method.
* init/control.c:
  - control_notify_disk_writeable(): New function to flush early job log.
* init/job_process.c:
  - job_process_terminated(): Call log_handle_unflushed() to potentially
    add log object to unflushed list (the early job log) in certain
    scenarios.
* init/log.c:
  - log_flushed: bool indicating successful flush of early job log.
  - log_unflushed_files: The "early job log" list.
  - log_new(): Call log_unflushed_init() and initialize new log members.
  - log_flush(): Only call log_read_watch() conditionally now.
  - log_io_reader(): More careful consideration of errno by
    using saved value from log member.
  - log_io_error_handler(): Set remote_closed for the benefit of
    log_flushed() (to avoid flushing multiple times).
  - log_file_open: Now saves errno value from open(2).
  - log_read_watch(): Removed log->unflushed->len assert since it was
    erroneous: even if unflushed data exists, it will be written in
    order when log_io_reader() calls log_file_write().
  - log_unflushed_init(): New function to initialise the
    log_unflushed_files list.
  - log_handle_unflushed(): New function that potentially adds log
    object to the log_unflushed_files list to allow the data to be
    flushed _after_ the parent object has been destroyed.
  - log_clear_unflushed(): New function to clear the
    log_unflushed_files list by attempting to flush the data to disk.
* init/log.h:
  - Added new Log members: detached, remote_closed and open_errno.
  - Updated documentation.
  - extern for log_unflushed_files.
  - Added prototypes for new functions: log_handle_unflushed(),
    log_clear_unflushed() and log_unflushed_init().
* init/tests/test_job_process.c:
  - test_run():
    - Call log_unflushed_init().
    - Corrected grammar in error messages for "ensure sane fds" tests.
    - "with single line command writing fast and exiting": Call
      nih_child_add_watch().
    - added waitid() calls to ensure log data not added to
      unflushed list.
  - test_spawn():
    - Call log_unflushed_init().
    - Corrected grammar in error messages for "ensure sane fds" tests.
    - Added TEST_ALLOC_SAFE() to "simple test" to ensure
      destructors run correctly.
    - "read single null byte with 'console log'": Call
      log_handle_unflushed() and added missing free.
    - "read data from forked process": Call
      log_handle_unflushed().
* init/tests/test_log.c:
  - Updated documentation.
  - Added calls to log_unflushed_init().
  - "ensure logger flushes cached data on request": New test
    for log_handle_unflushed().
* util/initctl.c:
  - notify_disk_writeable_action(): New function to notify
    Upstart that the disk is writeable.
  - commands: Added new command "notify-disk-writeable".
* util/man/initctl.8: Updated for new notify-disk-writeable command.
* util/tests/test_initctl.c:
  - STOP_UPSTART(): Check return from kill(2).
  - test_show_config(): Adding missing rmdir(2).
  - test_check_config(): Adding missing rmdir(2).
  - test_notify_disk_writeable(): New function embodying new test
    "with job ending before log disk writeable".

1366. By James Hunt on 2012-03-16

* job_process_spawn(): Only display single message
  if pty setup fails.
* init/man/init.5: Typo.
* init/tests/test_job_process:
  - child(): New TEST_OUTPUT_WITH_STOP test.
  - test_run(): New test "with multiple processes and log".
  - test_spawn():
    - umask reset.
    - New test "ensure multi processes output logged".

1365. By James Hunt on 2012-03-16

* init/tests/test_job_process:
  - Fixed multiple TEST_FAILED() typos
    ("unexpected" => unexpectedly").

1364. By James Hunt on 2012-03-16

[ Steve Langasek <email address hidden> ]
* init/tests/test_job_process:
  - close_all_files(): New function to ensure
    test environment has only expected fds open.
  - main(): Call close_all_files().

1363. By James Hunt on 2012-03-07

* init/job.c: job_new(): Initialize log array.
* init/job.h: Change Log element to an array to handle scenario where
  job has multiple simultaneous processes running (LP: #940290).
* init/job_process.c:
  - job_process_run(): pass ProcessType to job_process_spawn().
  - job_process_spawn():
    - Now accepts a ProcessType.
    - Ensure existing matching process type log is destroyed before
      creating a new one.
  - job_process_terminated(): Update for log array.
* init/job_process.h: Updated prototype for job_process_spawn().
* init/tests/test_job.c: test_new(): Updated logic for log array.
* init/tests/test_job_process.c: test_run():
  - Updated logic for log array.
  - Added ProcessType to job_process_spawn() calls.

1362. By James Hunt on 2012-03-05

* init/job_process.c: job_process_spawn(): If pty setup fails,
  log message and disable logging for job.
* init/man/init.5: Explain new behaviour should pty setup fail.
* init/tests/test_job_process.c: Updated disabled test
  "when no free ptys" for new behaviour.

1361. By James Hunt on 2012-03-01

init/man/init.5: Add further pty details.

1360. By James Hunt on 2012-03-01

Added missing changelog entry.

1359. By James Hunt on 2012-03-01

* init/job_class.c:
  - job_class_get_instance():
    - Use nih_local to avoid memory leak should nih_strcat_sprintf()
      fail.
    - Formatting.
  - job_class_start():
    - Use nih_local to avoid memory leak should nih_strcat_sprintf()
      fail.
    - Formatting.

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