help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Exiting the "read" builtin with trapped ^C


From: Chet Ramey
Subject: Re: Exiting the "read" builtin with trapped ^C
Date: Fri, 26 Jun 2026 15:29:15 -0400
User-agent: Mozilla Thunderbird

On 6/22/26 11:41 AM, Koichi Murase wrote:

   Why doesn't `continue' in the trap string take effect immediately?

I think this is indeed a non-trivial question. I don't have a
particular opinion on which behavior should be preferred.  Both the
current behavior and the requested behavior of the immediate
`continue' seem to make sense to me.

Because the trapped SIGINT doesn't cause the `read' builtin to complete,
and the `continue' will only take effect when it does.


--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]