When a process spawns a subshell, how is the ulimit
inherited?
Is it by user, by shell, or a combination?
Specifically, this was found in the context of HP Server Automation jobs failing on some managed AIX devices because of an interaction between the soft and hard ulimits
in place. In short, the Agent (which runs as root
and generates a subshell when processing commands from SA) was unable to process some jobs because its subshell was hitting a ulimit
.
Increasing the ulimit
solved the problem, but the question of how the ulimit
is inherited, and whether the soft or hard (or both) limits need to be raised is left open.
What is the appropriate answer to this question? It may be AIX-specific, or it may be across Unix/Linux variants - whichever is better.