toolbox/.github
Penn Bauman 1a1b956201 .github/workflows, test/system: Enable 210-ulimit.bats on Ubuntu 22.04
When 'toolbox run ulimit' is invoked, it comes down to invoking
"bash --login -c 'exec ulimit'" inside the container, and it leads to
different outcomes on Fedora and Ubuntu hosts.

On Fedora:
  $ bash --login -c 'exec ulimit'
  unlimited

On Ubuntu:
  $ bash --login -c 'exec ulimit'
  bash: line 1: exec: ulimit: not found

This is because Bash's exec built-in cannot execute another built-in and
needs an external command; and Fedora ships a wrapper for the ulimit
built-in as an external command [1] to satisfy POSIX [2]:
  $ cat /usr/bin/ulimit
  #!/usr/bin/sh
  builtin ulimit "$@"

... that Ubuntu doesn't.

Wrapping the 'ulimit' as 'bash -c ulimit' solves this problem because
then it becomes "bash --login -c 'exec bash -c ulimit'", and the exec
built-in can execute the external command bash(1).

[1] Fedora bash commit 3b09d0d67fe7ff4c
    Fedora bash commit a28ab9933095eaf6
    https://src.fedoraproject.org/rpms/bash/c/3b09d0d67fe7ff4c
    https://src.fedoraproject.org/rpms/bash/c/a28ab9933095eaf6
    https://bugzilla.redhat.com/show_bug.cgi?id=1297166

[2] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/toc.html

https://github.com/containers/toolbox/pull/1599

Signed-off-by: Penn Bauman <me@pennbauman.com>
2025-07-16 15:34:00 +02:00
..
ISSUE_TEMPLATE Drop one "o" and rename the project as "Toolbx" 2024-02-06 18:24:26 +01:00
workflows .github/workflows, test/system: Enable 210-ulimit.bats on Ubuntu 22.04 2025-07-16 15:34:00 +02:00
CODEOWNERS Move the code for Ubuntu support into its own file 2025-05-06 02:39:28 +02:00