Sysop: | Amessyroom |
---|---|
Location: | Fayetteville, NC |
Users: | 43 |
Nodes: | 6 (0 / 6) |
Uptime: | 108:39:47 |
Calls: | 290 |
Files: | 905 |
Messages: | 76,698 |
[...]
The trap setup for catching the SIGWINCH and SIGALRM signals now looks
like this:
trap 'basta_uln_save=$_; basta.update_status; : "$basta_uln_save"' ALRM WINCH
instead of just
trap basta.update_status ALRM WINCH
[...]
On 10.04.2024 07:29, Kaz Kylheku wrote:
[...]
The trap setup for catching the SIGWINCH and SIGALRM signals now looks
like this:
trap 'basta_uln_save=$_; basta.update_status; : "$basta_uln_save"' ALRM WINCH
instead of just
trap basta.update_status ALRM WINCH
I know that this looks like a hack, but since 'update_status' needs no arguments you could also more simply just write...?
trap 'basta.update_status "$_"' ALRM WINCH
(Not sure whether introducing a global variable and supplementary code
or this hack is "better". Just mentioning it for a possible variant.)