Build auditing and background processes

If some conditions are met, HCL VersionVault build programs audit background processes correctly.

The VersionVault build programs--clearmake, clearaudit, and abe--use the same procedure to produce configuration records:

  1. Send a request to the multiversion file system (MVFS) of the host to initiate build auditing.
  2. Start one or more child processes (typically, shell processes), in which makefile build scripts or other commands are executed.
  3. Turn off MVFS build auditing.
  4. If all the subprocesses have indicated success and at least one MVFS file is created, compute and store one or more configuration records.

Any subprocesses of the child processes started in Step 2 inherit the same MVFS build audit. (Recursive invocations of VersionVault build programs conduct their own, independent audits; see Build sessions, subsessions, and hierarchical builds.)

A problem can occur if a build script (or other audited command) invokes a background subprocess and exits without waiting for it to complete. The build program has no knowledge of the background process and might proceed to Step 3 and Step 4 before the background process has finished its work. In such situations, VersionVault cannot guarantee what portion, if any, of the actions of background commands will be included in the resulting CR. The contents of the CR depend on system scheduling and timing behavior.

The VersionVault build programs audit background processes correctly only if both of the following conditions are true:

  • The build script does not complete until all background processes are known to have finished.
  • Each background process performs its first MVFS file access while it is still a descendant process of the clearmake or clearaudit process. (The VersionVault kernel component determines whether to audit a given process when that process first accesses the MVFS. If the process's ancestors include a process already being audited, the descendant process is similarly marked for auditing.)

If either or both of these conditions are false, avoid using background processes in audited build scripts.

Note: To be able to check out an element that was created during an audited session in that same session, add the following line to the config spec:

element * /main/0