summaryrefslogtreecommitdiffstats
path: root/background.c
AgeCommit message (Collapse)Author
2022-11-04Add explicit void to 0-parameter function definitions.Kevin McCarthy
These are the errors output with: -Werror=implicit-int -Werror=implicit-function-declaration -Werror=int-conversion -Werror=strict-prototypes -Werror=old-style-definition
2022-01-27Update source file copyright lines based on commit history.Kevin McCarthy
This is based on the copyright-updater script. That script only updates existing copyright lines in the headers. Other copyright is stored in the commit history.
2021-06-18Reset SIGPIPE signal handler in child process before exec().Kevin McCarthy
Ignored signals, such as SIGPIPE in Mutt, are inherited by child processes. This can cause incorrect behavior in filter-like programs that expect SIGPIPE to be the default value of "Term". A couple other places in Mutt already reset SIGTERM, SIGTSTP, and SIGCONT, with a comment mentioning it really wasn't necessary. Since I don't much like messing with signals, I'll leave those resets in. Extract those plus SIGPIPE into a new function, mutt_reset_child_signals() and add that before each exec call. Thanks to Vincent Lefèvre for reporting the issue and for the initial patch, which this commit is based upon.
2020-03-06Change mutt_FormatString() data parameter to type void *.Kevin McCarthy
All invocations pass a pointer parameter. Perhaps at one point this was like the init.h combined usage. But as with that, using an unsigned long is incorrect, and we've been lucky to get away with it. Since we don't need a union, just change it to void * to properly size the parameter.
2020-03-02Add $status_format 'B' expando for backgrounded count.Kevin McCarthy
Add "%?B? Back:%B?" to the default $status_format. Rather than iterating ProcessList for each status bar refresh, just add a counter in background.c.
2020-03-01Add %i to $background_format.Kevin McCarthy
This will show the parent message id for replies and forwarded messages.
2020-03-01Use -1, not WAIT_ANY for waitpid() portability.Kevin McCarthy
2020-02-29Add background flags to all other operations.Kevin McCarthy
- index and pager send operations. - query menu and resending. - recvattach operations. I initially thought there were complications, but the attachment menu decouples everything from the ATTACH_CONTEXT and doesn't free things before they are used.
2020-02-29Clean up background edit landing page.Kevin McCarthy
Try to get the OP_EXIT keybinding and print that instead. Manually center the strings, to avoid negative column computations. Allow overruns though - it's just a landing page. The message is more important than a possible sidebar overwrite due to a tiny window.
2020-02-29Confirm exiting if background edit processes exist.Kevin McCarthy
This prompt is in addition to the $quit prompt. A bit annoying, but I believe necessary to combat muscle memory and avoid losing compose sessions.
2020-02-29Pass sctx by reference to mutt_send_message_resume().Kevin McCarthy
This makes it more noticable that the parameter may be freed, and also prevents a use after free.
2020-02-29Add background compose menu and $background_format config var.Kevin McCarthy
List the backgrounded sessions. Allow the user to resume one, or exit the menu. Bind to 'B' by default in the index and pager menus. Remove the "<mail>" function autoresuming functionality, instead invoke the menu to resume backgrounded sessions.
2020-02-29Add background edit landing page.Kevin McCarthy
The landing page waits for the $editor process to exit, or until the user presses <exit>, "q" by default. If they press exit they are returned to the index. If the $editor exits first, they are returned directly to the compose process.
2020-02-29Enable backgrounding a single <mail> function.Kevin McCarthy
Backgrounding exits to the index menu. Re-invoking <mail> will resume the backgrounded session, if one exists, otherwise start a new session. This is just to get basic support going. Multiple background edits, a landing page, a background compose menu list will be added next.