When running jobs on a UNIX-based Java Agent (starting with version 24.x), the spawned process environment incorrectly inherits all environment variables from the user who started the Agent on the host (e.g., automic). This occurs even if the job is defined to run under a different user in the Login Object.
Expected Behavior: The job session should have a "clean" environment isolated from the Agent's host user, matching the behavior of legacy C-based Agents (v12.3, v21.0).
Actual Behavior: The job environment includes leaked variables from the Agent's owner, such as PATH, LD_LIBRARY_PATH, and custom variables set in the Agent's startup shell.
Example setup to reproduce:
Component: UNIX Agent (java-based)
Versions affected: 24.x
The Java-based Agent was found to copy and subsequently alter its own environment for spawned processes rather than creating a clean, isolated environment for the new job session. This was confirmed as a defect under DE179360.
The issue has been resolved. A fix is available in the following version:
UNIX Java Agent 24.4.3 HF1 (and all subsequent releases).
The fix restores the original behavior where the spawned process environment does not inherit the Agent host user's environment variables.