View Issue Details

IDProjectCategoryView StatusLast Update
0008999ardourbugspublic2022-10-17 17:17
Reporterumlaeute Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status newResolutionopen 
PlatformDebian GNUOSLinuxOS Version(any)
Product Version7.0 
Summary0008999: bashism in launch script
Descriptionthe script generated by 'gtk2_ardour/' contains a call to 'ulimit' which is a bash-builtin (and not mandated by POSIX sh).
however, the generated scripts uses '#!/bin/sh' as a shebang, indicating that this is a POSIX-compliant script.

Steps To Reproduce```sh
$ checkbashisms gtk2_ardour/
possible bashism in gtk2_ardour/ line 14 (ulimit):
MLOCK_LIMIT=$(ulimit -l)

$ shellcheck gtk2_ardour/
In gtk2_ardour/ line 14:
MLOCK_LIMIT=$(ulimit -l)
                     ^-- SC3045 (warning): In POSIX sh, ulimit -l is undefined.
TagsNo tags attached.



2022-10-17 14:08

administrator   ~0026618

Can we rely on bash being present? dash can also handle it just fine.

I think it is fine if the check fails when `ulimit` is not available. perhaps the proper solution is to add a 2>/dev/null or fall back to prlimit if that is available


2022-10-17 16:47

administrator   ~0026621

ulimit is a part of POSIX 1-2017 Section 12.2, Utility Syntax Guidelines.

What you actually mean is that the -l argument to ulimit is not defined by POSIX


2022-10-17 17:16

reporter   ~0026626



2022-10-17 17:17

reporter   ~0026627

"yes" as in: "the -l argument to ulimit is not defined by POSIX".

(rather than: "yes, just ignore 'ulimit' not working")

Issue History

Date Modified Username Field Change
2022-10-17 13:33 umlaeute New Issue
2022-10-17 14:08 x42 Note Added: 0026618
2022-10-17 16:47 paul Note Added: 0026621
2022-10-17 17:16 umlaeute Note Added: 0026626
2022-10-17 17:17 umlaeute Note Added: 0026627