Skip to content

trap EXIT INT does not seem to work at all with CTRL-C #6649

@netvl

Description

@netvl

This very simple script does not print anything when I run it like fish ./test-trap and then press CTRL-C:

trap "echo After" EXIT INT
sleep 100s

If I run exactly the same script with bash and press CTRL-C, it prints After two times.

It can be reproduced with a manual function whatever --on-event fish_exit --on-signal INT as well.

Fish version: 3.0.2
Linux void 5.4.11-arch1-1 SMP PREEMPT Sun, 12 Jan 2020 12:15:27 +0000 x86_64 GNU/Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething that's not working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions