Page MenuHomeFreeBSD

Mk/Uses/cabal.mk: Replace shell process in wrapper scripts
ClosedPublic

Authored by tobik on Apr 20 2021, 5:34 AM.
Tags
None
Referenced Files
F149617560: D29852.id87770.diff
Wed, Mar 25, 4:58 PM
F149606299: D29852.id87848.diff
Wed, Mar 25, 2:19 PM
Unknown Object (File)
Sun, Mar 22, 7:38 PM
Unknown Object (File)
Thu, Mar 19, 12:51 PM
Unknown Object (File)
Thu, Mar 19, 2:07 AM
Unknown Object (File)
Thu, Mar 19, 12:19 AM
Unknown Object (File)
Sat, Feb 28, 12:41 PM
Unknown Object (File)
Sat, Feb 28, 1:56 AM
Subscribers

Details

Summary
  • The wrapper scripts leave the shell running for no reason. Add an exec to replace the shell process
  • While here use ECHO_CMD not ECHO (ECHO is set to true on make -s in /usr/share/mk/sys.mk and shouldn't be used for things like this)

    Before:
$ ps -d
35230  5  Ss    0:00.09 -oksh (oksh)
35351  5  S+    0:00.00 - /bin/sh /usr/local/bin/shellcheck -
35352  5  S+    0:00.00 `-- /usr/local/libexec/cabal/shellcheck -

After:

$ ps -d
35230  5  Is    0:00.05 -oksh (oksh)
35236  5  I+    0:00.01 - /usr/local/libexec/cabal/shellcheck -

Diff Detail

Repository
R11 FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable