lp://staging/~jamesodhunt/upstart/fix-for-bug-912558

Created by James Hunt and last modified
Get this branch:
bzr branch lp://staging/~jamesodhunt/upstart/fix-for-bug-912558
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

1354. By James Hunt

* init/job_process.c: job_process_terminated(): Free log to ensure data
  written as soon as _any_ process ends (consider respawn jobs).
* init/log.c:
  - log_destroy():
    - Improved documentation.
    - Now calls new function log_flush().
  - log_flush(): New function to ensure no lingering buffered job data
    remains. Now considers EBADF (LP: #912558).
  - log_io_reader():
    - Added missing assert for @len.
    - Simplified ENOSPC handling.
    - Ensure log->io set to NULL to allow other routines to detect it
      really has gone.
  - log_file_write(): Added @len checks.
  - log_read_watch(): New function to drain data from a watch descriptor
    (which also must consider EBADF).
* init/log.h: Added define for LOG_READ_SIZE.
* init/tests/test_job_process.c:
  - test_run():
    - Added some extra pointer checks.
    - Free class *before* checking file to ensure destructor invoked at
      correct point.
    - Added test "with single-line command running an invalid command"
      (for scenario bug 912558 exposed).
    - Added test "with single-line command writing fast and exiting".
* init/tests/test_log.c: Changed all tests to use openpty(3) rather than
  pipe(2) for semantic parity with actual code.
* util/tests/test_user_sessions.sh:
  - ensure_no_output(): Now calls check_job_output() and delete_job() to
    simplify logic.
  - delete_job(): Call get_job_file() rather than doing it long-hand.
  - check_job_output(): New function.
  - start_job(): Added allow_failure parameter.
  - test_ensure_no_unexpected_output(): New test
    "ensure command job does not create log file with invalid command".

1353. By James Hunt

* init/man/init.5: Explain that all job processes affected
  by 'setuid' and 'setgid' stanzas.

1352. By James Hunt

* init/tests/test_job_process.c: test_run():
  - Changed timeout for test feature "ensure that no log
  file written for CONSOLE_NONE".

1351. By James Hunt

init/job_process.c: job_process_spawn():
- Set child handler to default rather than explicit ignore
  to avoid test failures in environments that disallow
  ignoring SIGCHLD.

1350. By James Hunt

* init/tests/test_job_process.c: Add missing include for
  fnmatch.h.

1349. By James Hunt

* init/man/init.5: lower-case all references to system jobs
  and user jobs.

1348. By James Hunt

* init/main.c: console_type_setter(): NihOptionSetter's should
  return 0 on success.

1347. By James Hunt

* init/log.c:
  - log_file_open(): Comments.
  - log_file_write(): Added missing cast on
    nih_io_buffer_shrink() call.

1346. By James Hunt

* init/job_process.c: job_process_spawn():
  - Correct ignoring of SIGCHLD prior to grantpt(3) call.
  - Removed redundant close(2) calls.
  - Move declarations to top of block for
    getpwnam(3)/getgrnam(3).

1345. By James Hunt

* init/job_class.c: Typo.

Branch metadata

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

Subscribers