4

Occasionally when I'm doing something in alpine, I'll forget and do the wrong thing (like open up my gmail folder when I meant to open my other IMAP account).

Then I have to wait for a few seconds for everything to finish.

I want to be able to cancel the operation and go to something else, but Ctrl+C doesn't work.

Is it possible to cancel the current operation in Alpine?

Michael Mrozek
  • 91,316
  • 38
  • 238
  • 232
Wayne Werner
  • 11,463
  • 8
  • 29
  • 43
  • 1
    given that we've only had 21 alpine questions in the past 6 years, and 1/3 of those are unanswered, I'm going to suggest a site like superuser.com (only 24 Q's there), or the [discussion list](https://www.washington.edu/alpine/alpine-info/) – Jeff Schaller May 31 '16 at 14:45
  • Tag `alpine` is for Alpine Linux, not Alpine email client. – Jakub Jirutka May 31 '16 at 23:30
  • @JakubJirutka sounds like someone needs to update the tag wiki then, cause it's empty right now :P – Wayne Werner May 31 '16 at 23:46
  • Gotta love when I come back to this 6 years later for the exact same problem (: – Wayne Werner Jun 02 '22 at 20:53

1 Answers1

0

alpine registers a custom handler do_hup_signal to handle SIGTERM and SIGHUP (pico/osdep/signals.c). Its function seems to be sending COMP_GOTHUP to the composer to begin shutting down of the program.

For SIGINT sent by Ctrl+C, it seems that the code has to opt-in to process it by calling intr_handling_on and intr_handling_off (alpine/signal.c) around the time-consuming part. The code needs to check whether intr_pending is set, then do the clean-up works (including cancelling the progress spinner at the bottom by calling cancel_busy_cue).

Hence the "cancellability" of actions depend on whether the developer has implemented it.


These are from a quick look at the source code after having to wait a few times (so not sure if other trigger exists). I haven't attempted to locate the part for connecting to IMAP mailboxes.

BTW: A recent mirror of its repository on GitHub like https://github.com/petemoore/alpine might help when doing code searches.