Re: trap commands in auxiliary scripts
Jan Engelhardt <[email protected]> Sat, 30 May 2026 00:39:46 +0200 (CEST)
| Newsgroups | gmane.comp.sysutils.automake.general |
|---|---|
| Message-ID | <[email protected]> |
On Saturday 2026-05-30 00:29, Bruno Haible via Discussion list for automake...: >'trap' commands in shell scripts present a dilemma: > > trap "rmdir '$lockdir'; exit 1" 1 2 15 > we get undefined behaviour if $lockdir contains a single-quote, Also worth noting is that $lockdir is/was evaluated at the time of the trap setup, and your patch changes the evaluation of $lockdir to the time of trap execution.