62 FILE **fp_err,
int fdin,
int fdout,
int fderr)
64 int pin[2], pout[2], perr[2], pid;
131 else if (fdout != -1)
143 else if (fderr != -1)
180 *fp_out = fdopen(pout[0],
"r");
186 *fp_in = fdopen(pin[1],
"w");
192 *fp_err = fdopen(perr[0],
"r");
206pid_t
filter_create(
const char *cmd, FILE **fp_in, FILE **fp_out, FILE **fp_err)
221 waitpid(pid, &rc, 0);
223 rc = WIFEXITED(rc) ? WEXITSTATUS(rc) : -1;
char ** mutt_envlist_getlist(void)
Get the private environment.
Private copy of the environment variables.
int filter_wait(pid_t pid)
Wait for the exit of a process and return its status.
pid_t filter_create(const char *cmd, FILE **fp_in, FILE **fp_out, FILE **fp_err)
Set up filter program.
pid_t filter_create_fd(const char *cmd, FILE **fp_in, FILE **fp_out, FILE **fp_err, int fdin, int fdout, int fderr)
Run a command on a pipe (optionally connect stdin/stdout)
Pass files through external commands (filters)
void mutt_sig_block_system(void)
Block signals before calling exec()
void mutt_sig_unblock_system(bool restore)
Restore previously blocked signals.