55 struct sigaction oldtstp;
56 struct sigaction oldcont;
59 if (!cmd || (*cmd ==
'\0'))
66 act.sa_handler = SIG_DFL;
69 act.sa_flags = SA_RESTART;
71 sigemptyset(&act.sa_mask);
72 sigaction(SIGTSTP, &act, &oldtstp);
73 sigaction(SIGCONT, &act, &oldcont);
82 act.sa_handler = SIG_DFL;
84 sigemptyset(&act.sa_mask);
85 sigaction(SIGTERM, &act, NULL);
86 sigaction(SIGTSTP, &act, NULL);
87 sigaction(SIGCONT, &act, NULL);
99 sigaction(SIGCONT, &oldcont, NULL);
100 sigaction(SIGTSTP, &oldtstp, NULL);
105 rc = (pid != -1) ? (WIFEXITED(rc) ? WEXITSTATUS(rc) : -1) : -1;
char ** mutt_envlist_getlist(void)
Get the private environment.
int imap_wait_keepalive(pid_t pid)
Wait for a process to change state.
Convenience wrapper for the library headers.
Prototypes for many functions.
void mutt_sig_block_system(void)
Block signals before calling exec()
void mutt_sig_unblock_system(bool restore)
Restore previously blocked signals.
int mutt_system(const char *cmd)
Run an external command.