Trap exit: exit is a builtin funtion
Closed this issue · 1 comments
kseistrup commented
In the “Trap signals and exit” document, the function exit()
is used, but exit
is already a builtin command. Please use die()
or cleanup()
, or similar.
If exit()
is indeed used, the result depends on the shell used:
bash
:exit()
is calleddash
: Syntax error: Bad function nameksh
: exit: invalid function namemksh
: function not calledmrsh
: function not calledposh
: function not calledyash
: function not calledzsh
: function not called
joelparkerhenderson commented
Thank you, good catch. You're correct. The function should be named "trap_exit". I fixed it now.