linuxCowboy wrote: ↑2022-09-22 09:24
Lately I discovered a regression of one of my aliases:
which is
It
closes the tab or window!
One thing is unclear in what you describes. It seems you have identified an issue with timing (-t option), but your alias has no such timing option. Can you please clarify this?
linuxCowboy wrote: ↑2022-09-22 09:24Please test with
bash in a terminal:
ret:1 okay
ret:142 +
exit!
I think that exit code 142 is normal behaviour.
Based on
What are Bash Exit Codes in Linux, 142 is 128+14 (128 + signal 14).
'man 7 signal' identify code 14 to SIGALRM and points to 'man 2 alarm':
alarm - set an alarm clock for delivery of a signal
[...]
alarm() arranges for a SIGALRM signal to be delivered to the calling process in seconds seconds.
If seconds is zero, any pending alarm is canceled.
[...]
sleep(3) may be implemented using SIGALRM
That is to say, if seconds is zero, pending alarm is canceled and Bash returns default error code 1 (because nothing is read), and it returns 128+SIGALRM code if seconds is more than zero and nothing is read.
I have tested (xterm, lxterminal, xfce4-terminal, even if this has certainly nothing to do with terminals): the error codes are the same as yours (which in my understanding is normal), but my terminals, as expected, don't exit. Regarding this unexpected exit, could you please post the output of:
What is weird is that, if I understand well what you say, your terminal doesn't exit with signal 1 but exits when signal 142 occurs. Can you confirm this?