Please check the status of this specification in Launchpad before editing it. If it is Approved, contact the Assignee or another knowledgeable person before making changes.

Summary

This specification proposes exporting an environment variable to all job processes so that it is possible for scripts and binaries to determine which job they are being run within.

Rationale

Jobs will frequently use libraries of functions or helper tools that may wish to adjust their behaviour depending on the job being run. In particular, initctl may wish to act on the job it's being called from by default.

Use cases

Scope

The scope of this specification is limited to the addition and use of this environment variable.

Design

Implementation

Code

The environment variable will be seeded by modifying process_setup_environment in init/process.c.

start_action in util/initctl.c will be modified to check this variable when no arguments are given, and only error if the variable is also missing.

Data preservation and migration

These changes are backwards compatible with the previous behaviour.


CategorySpec

JobEnvironmentVariable (last edited 2011-08-26 04:10:18 by localhost)