restic / restic

Fast, secure, efficient backup program
https://restic.net
BSD 2-Clause "Simplified" License
26.19k stars 1.55k forks source link

Should restic mount quit with Exit code 130? #2015

Closed jkirk closed 2 years ago

jkirk commented 6 years ago

Output of restic version

restic 0.9.2 compiled with go1.10.3 on linux/amd64

How did you run restic exactly?

# restic mount --allow-other --password-file /root/.restic_data_password -r /srv/backups/restic/hera01/ /mnt

What backend/server/service did you use to store the repository?

N/A

Expected behavior

Not sure, but we think restic mount should not exit with exit code 130, see: https://forum.restic.net/t/should-restic-mount-quit-with-exit-code-130-after-ctrl-c-sigint/1027

Actual behavior

Exit code 130.

Steps to reproduce the behavior

Do you have any idea what may have caused this?

Do you have an idea how to solve the issue?

See: https://forum.restic.net/t/should-restic-mount-quit-with-exit-code-130-after-ctrl-c-sigint/1027

Did restic help you or made you happy in any way?

Simple answer: yes! :+1: :smile:

fd0 commented 6 years ago

Probably not, in the special case of mount, restic should not return an error code for ^C. Thanks for the report!

ebastos commented 6 years ago

I would like to work on the fix for it. Looking at the code I don't see a simple solution, though. Tried to handle it via another cleanup handle, but that did not work. Maybe I took the wrong approach.

Any suggestions on how to tackle this issue, @fd0 ?

Thanks!

fd0 commented 6 years ago

Ah, thank you very much for the offer! Unfortunately I think it'd be best to rework the user interface around restic mount completely, and cleanup this mess in the process. But that's not really beginner friendly, let me know if you want to try anyhow!

ebastos commented 6 years ago

Ah, thank you very much for the offer! Unfortunately I think it'd be best to rework the user interface around restic mount completely, and cleanup this mess in the process. But that's not really beginner friendly, let me know if you want to try anyhow!

I would probably slow you down if taking ownership of the entire rework. However, if your approach ends up leading to a few smaller tasks I would be up to help with a couple. :)