1
2011-10-27 James Hunt <james.hunt@ubuntu.com>
3
Introduction of 'log' argument to 'console' stanza allowing
4
job output to be captured.
6
* contrib/vim/syntax/upstart.vim: Added 'log' and missing
8
* init/Makefile.am: Added log.c, log.h and test_log.c
9
* init/job.c: job_new(): Initialize log.
10
* init/job.h: Add Log pointer to Job.
11
* init/job_class.c: XXX: behaviour change: Default for 'console'
12
is now CONSOLE_LOG rather than CONSOLE_NONE.
13
Rationale is that if a job does produce output, you want to see
14
it since the chances are it will contain useful error details.
15
* init/job_class.h: Added CONSOLE_LOG to ConsoleType and updated
16
documentation for ConsoleType.
18
- job_process_run(): Updated to reflect new parameter for
20
- job_process_spawn(): Now accepts a Job rather than a
21
JobClass to allow job->log and class->console to be handled
22
appropriately. Now creates pty master and slave fds for
24
- job_process_error_read(): Added entries for:
25
- JOB_PROCESS_ERROR_OPENPT_MASTER
26
- JOB_PROCESS_ERROR_OPENPT_UNLOCKPT
27
- JOB_PROCESS_ERROR_PTSNAME
28
- JOB_PROCESS_ERROR_OPENPT_SLAVE
29
- job_process_log_path(): New function that returns full path to log
30
file for specified Job.
32
- Updated JobProcessErrorType with new entries:
33
- JOB_PROCESS_ERROR_OPENPT_MASTER
34
- JOB_PROCESS_ERROR_OPENPT_UNLOCKPT
35
- JOB_PROCESS_ERROR_PTSNAME
36
- JOB_PROCESS_ERROR_OPENPT_SLAVE
37
- job_process_spawn(): Updated prototype.
38
- job_process_log_path(): Added prototype.
40
- handle_logdir(): New function for overriding log directory.
41
- Added '--logdir' to options.
43
- Update and restructure of section on 'console' stanza.
44
- Added a FILES section.
45
* init/man/init.8: Updated with details of new '--logdir' option.
46
* init/parse_job.c: stanza_console(): Updated for "log".
47
* init/paths.h: Added defines for JOB_LOGDIR, LOGDIR_ENV, XDG_CACHE_HOME
49
* init/session.c: Added missing function headers. New functions:
50
session_user_home() and session_user_group().
51
* init/session.h: Added prototypes for session_user_home() and
53
* init/system.c: system_setup_console(): Update for CONSOLE_LOG.
55
- TEST_FORCE_WATCH_UPDATE(): Removed debug.
56
- test_select_job(): Added variable attributes to keep gcc 4.6 happy.
57
* init/test_event.c: Explicitly set console type to CONSOLE_NONE to
58
retain behaviour of existing tests.
60
- test_job_new(): Ensure log object not created on Job instantiation.
61
- test_change_state(): Explicitly set console type to CONSOLE_NONE to
62
retain behaviour of existing tests.
63
* init/test_job_class.c:
64
- test_new(): Ensure console type now defaults to CONSOLE_LOG.
65
- Explicitly set console type to CONSOLE_NONE to retain behaviour of
67
* init/test_job_process.c:
68
- child(): New child_tests added for TEST_OUTPUT and TEST_SIGNALS.
69
- get_available_pty_count(): New function.
70
- Explicitly set console type to CONSOLE_NONE to retain behaviour of
72
- test_run(): Added new tests for CONSOLE_LOG.
73
- test_spawn(): Added new tests for CONSOLE_LOG.
74
- test_log_path(): New function.
75
- test_handler(): Added UPSTART_LOGDIR support to
77
- Update to allow number of forks to be specified when run as a child
79
- Added call to test_log_path().
80
- initialize various subsystems since before, functions run from
81
main() had to be run in the order specified and exactly as listed
82
(certain tests relied on previous tests initializing a subsystem
83
which gives unexpected results and thus confusing behaviour
84
if the order of tests is changed).
85
* util/tests/test_user_sessions.sh: Added tests for job logging.
1
87
2011-08-11 Scott James Remnant <keybuk@google.com>
3
89
* init/job_process.c (job_process_spawn): Can't return on